I have tried for each image in the listbox to do
Without Task.Factory it does not give me the error but UI is completely unreponsive until all images are there.
If I don't use Taks.Factory and set
Is there a way to use async/await on the line
private void ExtractThumbnail()
{
Task.Factory.StartNew(() =>
{
using (MagickImage image = new MagickImage(fullPath))
{
image.Thumbnail(0, 100);
ImageSource mythumb = loadBitmap(image.ToBitmap());
if (mythumb.CanFreeze) mythumb.Freeze();
Thumbnail = mythumb;
}
but that leads to ImageMagick.MagickCacheErrorException.Without Task.Factory it does not give me the error but UI is completely unreponsive until all images are there.
If I don't use Taks.Factory and set
<Image Source="{Binding Thumbnail, IsAsync=True}"
then I get the error againIs there a way to use async/await on the line
using (MagickImage image = new MagickImage(fullPath))
or some other way to prevent the error and get all thumbnails?