private void FileTree_OnExpanded(object sender, RoutedEventArgs e) { var item = (TreeViewItem)e.OriginalSource; var node = item.Header as TreeNode; Tree.Expand(node); }