Exemplo n.º 1
0
 private void SetupFocus()
 {
     if (string.IsNullOrEmpty(ViewModel.Username))
     {
         UserTextBox.Focus(FocusState.Programmatic);
     }
     else if (string.IsNullOrEmpty(ViewModel.Host))
     {
         HostTextBox.Focus(FocusState.Programmatic);
     }
     else
     {
         Focus(FocusState.Programmatic);
     }
 }
Exemplo n.º 2
0
        private void SetupFocus()
        {
            SshProfileViewModel vm = (SshProfileViewModel)DataContext;

            if (string.IsNullOrEmpty(vm.Username))
            {
                UserTextBox.Focus(FocusState.Programmatic);
            }
            else if (string.IsNullOrEmpty(vm.Host))
            {
                HostTextBox.Focus(FocusState.Programmatic);
            }
            else
            {
                Focus(FocusState.Programmatic);
            }
        }