I'm using a TreeView that contain several items:
<TreeViewItem Header="PL3 Line 1" IsExpanded="true"> <TreeViewItem Header="Live Update" Selected="TreeViewItem_Selected" Height="20" Width="98"/> <TreeViewItem Header="Archives" Selected="TreeViewItem_Selected_1"/> <TreeViewItem Header="Archives / days" Selected="TreeViewItem_Selected_100"></TreeViewItem/> and I want to add different icon to each item, I have tried it by using a StackPanel:
<TreeViewItem> <TreeViewItem.Header> <StackPanel Orientation="Horizontal"> <Image Source="../Images/japan.png"></Image> <Label Content="Japan"></Label> </StackPanel> </TreeViewItem.Header> </TreeViewItem> but when I click on it, the event "Selected is not triggered.