Beispiel #1
0
 private void TreeViewKeyDownHandler(object parameter)
 {
     if (!(parameter is KeyEventArgs args))
     {
         return;
     }
     if (SelectedItem == null)
     {
         return;
     }
     if (args.Key == Key.F2)
     {
         SelectedItem.EnableEditing();
     }
     else if (args.Key == Key.Enter)
     {
         SelectedItem.ConfirmEditing();
     }
     else if (args.Key == Key.Escape)
     {
         SelectedItem.CancelEditing();
     }
 }