I have a TreeViewItem
that when Selected
, calles a method. However, I am finding that when the Selected
event is called, the Selected
event for the parent TreeViewItem
also seems to be called.
I would really rather than not happen, but I haven't been able to find any documentation telling my why this is happening in the first place.
Could someone enlighten me as to why this is happening to begin with, and perhaps how to stop it.
I am open to different objects instead of a treeviewitem, but I need to maintain the visual indication of selection.
Thanks!
PS: This is a snippet of what I have.
<TreeViewItem IsExpanded="True" IsSelected="False" Selected="Fire_MaxCustomer_Selected_Event">
<TreeViewItem.Header>
<TextBlock Text="{Binding Path=DisplayName}" />
</TreeViewItem.Header>
<TreeViewItem.Items>
<TreeViewItem Header="Orders & Credits" Selected="Fire_Orders_Credits_Event" />