I have a Image control with binding settings like this:
<Image Stretch="Uniform" Source="{Binding Path=CurrentItem, Converter={StaticResource ImgConverter}, IsAsync=True}"/>
And the ImgConverter is:
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string uri = null;
Compressor.Unzip((value as Zipfile));
uri = string.Format("{0}{1}.jpg", Compressor.TempPath, value.ToString());
return uri;
}
The Compressor.Unzip(...) method does take some time. I set the binding IsAsync=True but it doesn't work(NOT on converter but only on path?). How can I handle this asynchronously?
Binding.IsAsyncproperty only affects the property getter, but not the binding converter. So you may consider to replace the converter by an additional view model property likeCurrentImagewhich you can bind to asynchronously without converter.CurrentItemis defined.IsSynchronizedWithCurrentItemso theCurrentItemis not defined by myself.