Hi, In y treeview i have text,after i seelcted that,i want to retrive that selected item as string and i need to pass this string to various fucntions.
I dont know how to get the selected item.I coded like
private void treeview1_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
TreeViewItem selectedTVI = null;
if (treeview1.SelectedItem != null)
{
selectedTVI = treeview1.Tag as TreeViewItem;
}
}
But selectedTVi shows NULL.What can i do?