Esempio n. 1
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);

            if (e.Key == Key.Delete)
            {
                _graphViewModel.RemoveSelectedElements();
            }
            if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
            {
                if (e.Key == Key.A)
                {
                    _graphViewModel.SelectAll();
                    _elementsGraph.Values.ToList().ForEach(el => el.IsSelected = true);
                }
            }
        }