I have a TreeView in wpf how can one get the TreeView node click event so that I can get the value of the node on which the user has clicked?
Xaml
<Grid Height="258" Width="275">
<TreeView Height="258" HorizontalAlignment="Left" Name="treeView1" VerticalAlignment="Top" Width="275">
</TreeView>
</Grid>
I have populated this TreeView from the C# code. What event methode do I need to write into c# code to get the value of clicked node by the user in my c# code.
Code Behind to Load
TreeViewItem treeItem = null;
treeItem = new TreeViewItem();
treeItem.Header = "Name";