Exemplo n.º 1
0
        private static void CanRedo(object target, CanExecuteRoutedEventArgs args)
        {
            CanvasView cv = target as CanvasView;

            if (cv == null)
            {
                return;
            }

            cv.CommandRedo_CanExecute(target, args);
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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);
        }