System.Windows.Media.ImageSource has TypeConverterAttribute
[TypeConverter(typeof(ImageSourceConverter))]
The binding will look for it and automatically use the converter.
If you look at ImageSourceConverter , you will see what types it can convert from:
if (sourceType == typeof(string) || sourceType == typeof(Stream) || sourceType == typeof(Uri) || sourceType == typeof(byte[])) { return true; }
To emulate this process, you must add a TypeConverterAttribute to the type of the associated property.
You can do this using 1. type control or 2. use TypeDescriptor at runtime to add an attribute. There is a question about it here .
Will source share