Using image resource in XAML markup?
- by Jeff Dahmer
I'm trying to add little icons to my tabs in WPF but having trouble with how to set up the binding.
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Image Source="{Binding Source=prop:Resources.eye}" />
<Label VerticalAlignment="Center">Header</Label>
</StackPanel>
</TabItem.Header>
The xmlns:prop is set up for the local project's Properties, I am pulling other values from it elsewhere so I know that the namespace works. The markup above compiles fine BUT I don't see the eye image in the tab.
Also, is there any way to set this up into a template? I'm fairly new to XAML/WPF and each tab will have its own image...