Exemplo n.º 1
0
 void LoginControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if ((bool)e.NewValue == true)
     {
         Dispatcher.BeginInvoke(
             DispatcherPriority.ContextIdle,
             new Action(() => MyPasswordBox.Focus()));
     }
 }
Exemplo n.º 2
0
 private void MyPasswordBox_GotFocus(object sender, RoutedEventArgs e)
 {
     MyPasswordBox.SelectAll();
 }