private void Enter_Click(object sender, RoutedEventArgs e) { if (_passcodeService.TryUnlock(Field.Password)) { Unlock(); } else { Lock(); CoreInputView.GetForCurrentView().TryShow(); } }
public EmojiCommand() { Executioner = viewModel => { viewModel.InvokeFocusTextBox(); try //More error here { CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji); } catch (Exception ex) { Analytics.TrackEvent($"Attempting to open emoji keyboard\r\n{ex.Message}"); } return(Task.CompletedTask); }; }
private async void OnLoaded(object sender, RoutedEventArgs e) { Window.Current.Activated += Window_Activated; Window.Current.SizeChanged += Window_SizeChanged; UpdateView(); if (_passcodeService.IsBiometricsEnabled && await KeyCredentialManager.IsSupportedAsync()) { Biometrics.Visibility = Visibility.Visible; if (_biometrics) { Biometrics_Click(null, null); } } else { Field.Focus(FocusState.Keyboard); CoreInputView.GetForCurrentView().TryShow(); } }
private void AppBarButton_Click(object sender, RoutedEventArgs e) { CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji); }
void TextBox_GotFocus(object sender, RoutedEventArgs e) { CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji); }
private void DisplayEmojiSelector() { // Ensure to be on Main UI Thread if (!MainThread.IsMainThread) { MainThread.BeginInvokeOnMainThread(() => DisplayEmojiSelector()); return; } if (inputInjector == null) { try { inputInjector = InputInjector.TryCreate(); } catch { // Nothing to do } } // If we cannot create InputInjector, we display Emoji Selector in a different way if (inputInjector == null) { CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji); return; } // If necessary create first input keyboard info if (leftWindowsDown == null) { leftWindowsDown = new InjectedInputKeyboardInfo(); leftWindowsDown.VirtualKey = (ushort)(VirtualKey.LeftWindows); leftWindowsDown.KeyOptions = InjectedInputKeyOptions.None; } if (leftWindowsUp == null) { leftWindowsUp = new InjectedInputKeyboardInfo(); leftWindowsUp.VirtualKey = (ushort)(VirtualKey.LeftWindows); leftWindowsUp.KeyOptions = InjectedInputKeyOptions.KeyUp; } if (periodDown == null) { periodDown = new InjectedInputKeyboardInfo(); periodDown.VirtualKey = 0xBE; periodDown.KeyOptions = InjectedInputKeyOptions.None; } if (periodUp == null) { periodUp = new InjectedInputKeyboardInfo(); periodUp.VirtualKey = 0xBE; periodUp.KeyOptions = InjectedInputKeyOptions.KeyUp; } // Send keyboard inputs inputInjector.InjectKeyboardInput(new[] { leftWindowsDown, periodDown, periodUp, leftWindowsUp }); }
/// <summary> /// Обработка нажатия на кнопку эмоджи /// </summary> private void Button_Click(object sender, RoutedEventArgs e) { MessageBox.Focus(FocusState.Programmatic); CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji); }
private void EmojiHolder_Tapped(object sender, TappedRoutedEventArgs e) { CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji); }