Exemplo n.º 1
0
        void PART_CompletionList_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Enter:
                if (PART_CompletionList.SelectedIndex < 0)
                {
                    PART_CompletionList.SelectedIndex = 0;
                }
                SelectItem((EveItem)PART_CompletionList.SelectedItem);
                IsDropDownOpen = false;
                e.Handled      = true;
                break;

            case Key.Escape:
                CancelSelection();
                e.Handled = true;
                break;

            case Key.Up:
            case Key.PageUp:
            case Key.Down:
            case Key.PageDown:
                break;

            default:
                // if we're typing, we probably want to go back to the textbox
                PART_TextBox.Focus();
                PART_TextBox.RaiseEvent(e);
                break;
            }
        }