Example #1
0
 void OnDeleteAnnotationCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (EditingContextUtilities.GetSingleSelectedModelItem(this.Context) == this.ModelItem)
     {
         ContextMenuUtilities.OnDeleteAnnotationCommandCanExecute(e, this.Context, this.FindSwitch());
     }
 }
Example #2
0
 void OnEditAnnotationCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (EditingContextUtilities.GetSingleSelectedModelItem(this.Context) == this.ModelItem)
     {
         // call the same method as delete annotation command
         ContextMenuUtilities.OnDeleteAnnotationCommandCanExecute(e, this.Context, this.FindTryCatch());
     }
 }
 void OnDeleteAnnotationCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     if (EditingContextUtilities.GetSingleSelectedModelItem(this.Context) == this.ModelItem)
     {
         e.CanExecute = false;
         e.Handled    = true;
     }
 }