I'm binding a ListView to a list of objects, like so;
<ListView
ItemsSource="{ Binding Path=. }"
ItemTemplate="{DynamicResource EventTemplate}">
I'm binding to an object which declares two properties;
string DisplayName { get; }
System.Drawing.Image Image { get; set; }
I want to populate a DataTemplate
but I can't figure out how; if I do this in my template;
<StackPanel Orientation="Horizontal">
<Image Source="{ Binding Path=Image }" />
<TextBlock Text="{ Binding Path=DisplayName }" />
</StackPanel>
The text appears but the image does not. What am I doing wrong? The debug output shows
System.Windows.Data Error: 1 : Cannot create default converter
to perform 'one-way' conversions between types
'System.Drawing.Image' and 'System.Windows.Media.ImageSource'.
Consider using Converter property of Binding.
BindingExpression:Path=Image; DataItem='RealElement'
(HashCode=54308798); target element is 'Image' (Name='');
target property is 'Source' (type 'ImageSource')