The following xaml works ok inside a Window
:
&l
I thought I would complete the other answer by providing the alluded-to Converter.
Now I use this converter and that seems to work, no more Source' property is not set error.
public class CroppedBitmapConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
FormatConvertedBitmap fcb = new FormatConvertedBitmap();
fcb.BeginInit();
fcb.Source = new BitmapImage(new Uri((string)value));
fcb.EndInit();
return fcb;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}