I’ trying to display an image along with some text as a listbox item – the text is displayed but the image is not.
Here’s the datatemplate xaml:
<DataTemplate x:Key="DT">
<StackPanel Orientation="Horizontal">
<Image Source="C:\test1.png" Height="24" Width="24" />
<sdk:Label Content={Binding} />
</StackPanel>
<DataTemplate>
<ListBox x:Name="bla" ItemTemplate="{StaticResource DT}">
</ListBox>
When I’m trying to display the same image outside the listbox it works perfectly
Try to include image in your project and use relative path: