I encountered special behavior when binding to a property Source Imageusing a converter.
It seems that if I use simple Bindingc IValueConverter, which returns a string corresponding to the relative path to the image, everything is fine and the image is displayed.
On the other hand, if I use MultiBindingc IMultiValueConverter, which returns the same string, the binding does not work, and this error message is displayed in the VS2010 output window:
System.Windows.Data error: 5: The value generated by BindingExpression is not valid for the target property; Value = '' MultiBindingExpression: the target element is an "Image" (Name = ''); target is "Source" (type "ImageSource")
I found out that for this I cannot return a simple string (and not even Uri). Instead, I have to create an ImageSource in my converter (a BitmapImage) and return it.
Do you know why this strange behavior happens? Is this difference between Bindingand known MultiBinding, or is this a mistake?
I found an https://stackoverflow.com/a/3129609/ which can relate to this, where Alvin posted a comment about the time when the binding is allowed:
, MultiBinding AFTER TextBlock () TextBlok - Avlin
, , .
!