I have a TreeView
like this:
xaml:
<TreeView>
<TreeViewItem Header="header" Name="mytreeViewItem" Selected="mytreeViewItem_Selected"/>
</TreeView>
xaml.cs:
mytreeViewItem.ItemsSource = new List<string>(){"a"};
When I select the TreeViewItem
nameed a
, it will trigger event mytreeViewItem_Selected
. But when I select the TreeViewItem
again, it wont trigger the event again. How can I trigger the Selected
event when I select the TreeView
every time?