private void ScrollView_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement; string oldFEName = (oldFE == null) ? "null" : oldFE.Name; FrameworkElement newFE = args.NewFocusedElement as FrameworkElement; string newFEName = (newFE == null) ? "null" : newFE.Name; AppendAsyncEventMessage($"ScrollView.LosingFocus FocusState={args.FocusState}, Direction={args.Direction}, InputDevice={args.InputDevice}, oldFE={oldFEName}, newFE={newFEName}"); }
private void ScrollViewer_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { FrameworkElement oldFE = args.OldFocusedElement as FrameworkElement; string oldFEName = (oldFE == null) ? "null" : oldFE.Name; FrameworkElement newFE = args.NewFocusedElement as FrameworkElement; string newFEName = (newFE == null) ? "null" : newFE.Name; AppendAsyncEventMessage("ScrollViewer.LosingFocus FocusState=" + args.FocusState + ", Direction=" + args.Direction + ", InputDevice=" + args.InputDevice + ", oldFE=" + oldFEName + ", newFE=" + newFEName); }
private void TxtScaleTimer_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { try { AppSettings.ScaleTimer = Int32.Parse(txtScaleTimer.Text.ToString()); } catch (Exception ex) { App.PrintOkMessage(ex.Message, ResourceLoader.GetForViewIndependentUse("Resources").GetString("titleSettingsOnSaveTimer")); } }
private void SearchBox_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { if (args.NewFocusedElement is ListViewItem && !Context.SearchItems.IsNullorEmpty()) { if (Context.SearchItems[0].InnerType == MediaType.Placeholder) { args.Cancel = true; return; } } SearchBoxCollapse.Begin(); }
private void emailBlock_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { if (emailPattern.IsMatch(emailBlock.Text)) { EmailMsg.Text = "OK!"; EmailMsg.Foreground = new SolidColorBrush(Colors.Green); } else { EmailMsg.Text = "Email Invalid!"; EmailMsg.Foreground = new SolidColorBrush(Colors.Red); } }
private void phoneBlock_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { if (phonePattern.IsMatch(phoneBlock.Text)) { PhoneMsg.Text = "OK!"; PhoneMsg.Foreground = new SolidColorBrush(Colors.Green); } else { PhoneMsg.Text = "Phone Invalid!"; PhoneMsg.Foreground = new SolidColorBrush(Colors.Red); } }
void ConcluirEdicaoIP(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { if (estabelecendoConexao) { return; } var txtBox = (TextBox)sender; var newIP = txtBox.Text; if (newIP.Length == 0) { txtBox.Text = CodigoServidor; } else if (newIP.Length != 12) { args.Cancel = true; } else if (CodigoServidor != newIP) { EstabelecerConexaoAsync(txtBox, newIP); } }
private async void FontSizeTextBox_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { await SetFontSize(); }
private void SecondTextBox_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { }
private void btn_LosingFocus(Windows.UI.Xaml.UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args) { (sender as Button).Background = new SolidColorBrush(Colors.Gray); }