protected override SelectionMode HandleKeyboardEvent(object sender, KeyEventArgs keyEventArgs)
        {
            if (keyEventArgs.IsDown)
            {
                if (SelectionModeManager.IsMultiSelectionKey(keyEventArgs.Key))
                {
                    return(this);
                }

                if (ToggleSelectionKey.Matches(sender, keyEventArgs))
                {
                    log.Debug("Toggling current item's selection");
                    ToggleItemSelection();
                    keyEventArgs.Handled = true;
                }
            }
            else if (keyEventArgs.IsUp)
            {
                UpdateKeyboardStatus();
                if (!ctrlIsDown && !shiftIsDown)
                {
                    return(SelectionModeManager.SingleSelectionMode);
                }
            }

            return(this);
        }
Esempio n. 2
0
        protected override SelectionMode HandleKeyboardEvent(object sender, KeyEventArgs keyEventArgs)
        {
            if (keyEventArgs.IsDown)
            {
                if (SelectionModeManager.IsMultiSelectionKey(keyEventArgs.Key))
                {
                    log.Debug("Pressed key is multi selection key.");
                    return(SelectionModeManager.MultiSelectionMode);
                }
            }

            return(this);
        }