private void OnLostFocus() { if (!EditText.Validate()) { EditTextBox.Focus(FocusState.Keyboard); return; } EditText.CompleteEdit(); }
private void OnKeyDown(KeyRoutedEventArgs e) { if (e.Key == VirtualKey.Escape) { EditText.CancelEdit(); } else if (e.Key == VirtualKey.Enter && !EditText.IsMultiLine.Value && EditText.Validate()) { EditText.CompleteEdit(); } }