private TextBox Focused()
 {
     if (NameTb.Focus())
     {
         return(NameTb);
     }
     else if (ValueTb.Focus())
     {
         return(ValueTb);
     }
     else if (DescriptionTb.Focus())
     {
         return(DescriptionTb);
     }
     else if (SearchTB.Focus())
     {
         return(SearchTB);
     }
     else
     {
         return(NameTb);
     }
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     NameTb.Focus();
 }
 private void NameTb_MouseDown(object sender, MouseButtonEventArgs e)
 {
     NameTb.Focusable  = true;
     NameTb.CaretIndex = NameTb.CaretIndex;
     NameTb.Focus();
 }
예제 #4
0
 private void JoinLobbyButton_OnClick(object sender, RoutedEventArgs e)
 {
     NameTb.Focus(FocusState.Programmatic);
 }