private void CreateNew_Click(object sender, RoutedEventArgs e) { trenode = null; NodeDialog DialogWindow = new NodeDialog(); DialogWindow.Owner = this; DialogWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; DialogWindow.ShowDialog(); grid.Children.Clear(); if (Tree.Head != null) { PrintTree <string>(Tree.Head, 0, 0, Zoom); } }
public void NodeDialog(object sender, MouseButtonEventArgs e) { Button btn = sender as Button; trenode = btn.Tag as TreeNode <string>; NodeDialog DialogWindow = new NodeDialog(); DialogWindow.Owner = this; DialogWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; DialogWindow.ShowDialog(); grid.Children.Clear(); if (Tree.Head != null) { PrintTree <string>(Tree.Head, 0, 0, Zoom); } }