private void OnKeyboardDown(object sender, KeyRoutedEventArgs e) { if (e.Key == Windows.System.VirtualKey.Back || e.Key == Windows.System.VirtualKey.Delete) { var text = sender as TagsTextBoxItemPresenter; if (text != null) { InputPlaceholder.Focus(FocusState.Keyboard); var source = ItemsSource as IList; if (source != null) { source.Remove(text.Tag); } //ItemsWrapPanel.Children.Remove(text); //Tags.Remove(text.RealWord); e.Handled = true; } } else { var text = sender as TextBox; InputPlaceholder.Focus(FocusState.Keyboard); InputPlaceholder.OnKeyDownOverride(e); text.Text = string.Empty; } }
public void FocusInput(FocusState value) { if (InputPlaceholder != null) { InputPlaceholder.Focus(value); } }