private void tree_selected(object sender, RoutedEventArgs e) { tree_results.Content = ((TreeViewItem)treeView1.SelectedItem).Header + " selected"; }