private static void CanRedo(object target, CanExecuteRoutedEventArgs args) { CanvasView cv = target as CanvasView; if (cv == null) { return; } cv.CommandRedo_CanExecute(target, args); }
private static void OnDelete(object target, ExecutedRoutedEventArgs args) { CanvasView cv = target as CanvasView; if (cv == null) { return; } cv.CommandDelete_Executed(target, args); args.Handled = true; }
public static CanvasView GetCanvasView(DependencyObject obj) { while (obj != null) { CanvasView cv = obj as CanvasView; if (cv != null) { return(cv); } obj = VisualTreeHelper.GetParent(obj); } return(null); }