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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…