void textbox_LostFocus(object sender, RoutedEventArgs e) { if (!textbox_email.IsFocused && !textbox_name.IsFocused)// && !textbox_password.IsFocused) if (keyboard_frame != null) keyboard_frame.Visibility = System.Windows.Visibility.Collapsed; }