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(); }
private void JoinLobbyButton_OnClick(object sender, RoutedEventArgs e) { NameTb.Focus(FocusState.Programmatic); }