Convention for binding an Image should be one-way
description
I have an Image named Photo and an VM property byte[] Photo.
If my XAML has Source="{Binding Path=Photo}", it works fine.
If I rely on the convention and remove the Source attribute from the XAML, I get the following trace output:
System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Byte[]' and 'System.Windows.Media.ImageSource'. Consider using Converter property of Binding. BindingExpression:Path=Photo; DataItem='EditJobPhotoViewModel' (HashCode=20650019); target element is 'Image' (Name='Photo'); target property is 'Source' (type 'ImageSource')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='System.Byte[]' BindingExpression:Path=Photo; DataItem='EditJobPhotoViewModel' (HashCode=20650019); target element is 'Image' (Name='Photo'); target property is 'Source' (type 'ImageSource')
INFO: [2012-05-15T11:00:58.0079422-07:00] Binding Convention Applied: Element Photo.
Seems like Images should be one-way bindings.