Exemple #1
0
        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}");
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 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();
 }
Exemple #5
0
 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);
     }
 }
Exemple #6
0
 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);
     }
 }
Exemple #7
0
        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);
            }
        }
Exemple #8
0
 private async void FontSizeTextBox_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args)
 {
     await SetFontSize();
 }
Exemple #9
0
 private void SecondTextBox_LosingFocus(UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args)
 {
 }
Exemple #10
0
 private void btn_LosingFocus(Windows.UI.Xaml.UIElement sender, Windows.UI.Xaml.Input.LosingFocusEventArgs args)
 {
     (sender as Button).Background = new SolidColorBrush(Colors.Gray);
 }