예제 #1
0
        private void Designer_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.Key == Key.Escape || (e.Key == Key.Z && Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) || e.Key == Key.Left) &&
                ActionManager.CanUndo)
            {
                Undo();
                return;
            }

            if (((e.Key == Key.Y && Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) || e.Key == Key.Right) &&
                ActionManager.CanRedo)
            {
                Redo();
                return;
            }

            if (e.Key == Key.Delete)
            {
                SelectionManager.Delete();
                return;
            }

            if (e.Key == Key.C && Keyboard.Modifiers.HasFlag(ModifierKeys.Control))
            {
                Xaml.Copy();
                return;
            }
        }
예제 #2
0
 void RecycleBin_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     SelectionManager.Delete();
 }