protected override void OnTextInput(TextCompositionEventArgs e) { if (e == null) { throw new ArgumentNullException(nameof(e)); } base.OnTextInput(e); if (!e.Handled) { foreach (var c in e.Text) { switch (_itemList.ProcessInput(c)) { case CompletionItemListKeyResult.BeforeStartKey: ExpectInsertionBeforeStart = true; break; case CompletionItemListKeyResult.NormalKey: break; case CompletionItemListKeyResult.InsertionKey: CompletionList.RequestInsertion(e); return; case CompletionItemListKeyResult.Cancel: Close(); return; } } } }