I have included an icon file inside my Resources.resx that I'd like to show on a TreeViewItem that is inside a stackpanel.
1)Can .ico files be used for this purpose? Or does it have to be .bmp or jpg?
2)What do you set the source as in XAML? The following code didn't work for me
<StackPanel Orientation="Horizontal">
<Image Margin="2" Source="/Resources/Folder_Back.ico" />
<TextBlock Margin="2" Text="{Binding ProgramName}"
Foreground="White" FontWeight="Bold"/>
</StackPanel>
See Question&Answers more detail:os