Esempio n. 1
0
        // GotFocus y LostFocus para los WaterMakers de los TextBox

        private void comprobarFocus()
        {
            if (!string.IsNullOrEmpty(Nombre.Text))
            {
                NombreWM.Visibility = System.Windows.Visibility.Collapsed;
                Nombre.Visibility   = System.Windows.Visibility.Visible;
                Nombre.Focus();
            }
            if (!string.IsNullOrEmpty(Apellido.Text))
            {
                ApellidoWM.Visibility = System.Windows.Visibility.Collapsed;
                Apellido.Visibility   = System.Windows.Visibility.Visible;
                Apellido.Focus();
            }
            if (!string.IsNullOrEmpty(Telefono1.Text))
            {
                Telefono1WM.Visibility = System.Windows.Visibility.Collapsed;
                Telefono1.Visibility   = System.Windows.Visibility.Visible;
                Telefono1.Focus();
            }
            if (!string.IsNullOrEmpty(Telefono2.Text))
            {
                Telefono2WM.Visibility = System.Windows.Visibility.Collapsed;
                Telefono2.Visibility   = System.Windows.Visibility.Visible;
                Telefono2.Focus();
            }
            if (!string.IsNullOrEmpty(Direccion.Text))
            {
                DireccionWM.Visibility = System.Windows.Visibility.Collapsed;
                Direccion.Visibility   = System.Windows.Visibility.Visible;
                Direccion.Focus();
            }
            if (!string.IsNullOrEmpty(email.Text))
            {
                emailWM.Visibility = System.Windows.Visibility.Collapsed;
                email.Visibility   = System.Windows.Visibility.Visible;
                email.Focus();
            }
        }
Esempio n. 2
0
 private void Telefono2WM_GotFocus(object sender, RoutedEventArgs e)
 {
     Telefono2WM.Visibility = System.Windows.Visibility.Collapsed;
     Telefono2.Visibility   = System.Windows.Visibility.Visible;
     Telefono2.Focus();
 }