Example #1
0
 private static void OnClosed(object?sender, EventArgs eventArgs)
 {
     if (sender is Window window)
     {
         window.Closed -= OnClosed;
         TouchKeyboard.Hide();
     }
 }
Example #2
0
        private static void OnTouchEnter(object sender, RoutedEventArgs e)
        {
            var textBox = (System.Windows.Controls.TextBox)sender;

            if (GetShowTouchKeyboardOnTouchEnter(textBox))
            {
                TouchKeyboard.Show();
            }
        }
        private static void OnLostFocus(object sender, RoutedEventArgs e)
        {
            var textBox = Keyboard.FocusedElement as System.Windows.Controls.TextBox;

            if (textBox == null || !GetShowTouchKeyboardOnTouchEnter(textBox))
            {
                TouchKeyboard.Hide();
            }
        }
Example #4
0
        private static void OnLostFocus(object sender, RoutedEventArgs e)
        {
            if (!IsShowTouch(Keyboard.FocusedElement) &&
                IsShowTouch(sender))
            {
                TouchKeyboard.Hide();
            }

            bool IsShowTouch(object?o)
            {
                return(o is System.Windows.Controls.TextBox focused &&
                       GetShowTouchKeyboardOnTouchEnter(focused));
            }
        }
 private static void OnClosed(object sender, EventArgs eventArgs)
 {
     ((Window)sender).Closed -= OnClosed;
     TouchKeyboard.Hide();
 }