private void CbMode_SelectionChanged(object sender, SelectionChangedEventArgs e) { var mode = (ComboboxMarketMode)CbMode.SelectedItem; switch (mode?.Mode) { case ViewMode.Normal: HideAllGrids(); GridNormalMode.Visibility = Visibility.Visible; TxtSearch.Focus(); return; case ViewMode.Player: HideAllGrids(); GridPlayerMode.Visibility = Visibility.Visible; TxtBoxPlayerModeUsername.Focus(); return; } }
private void CbMode_SelectionChanged(object sender, SelectionChangedEventArgs e) { var mode = _mainWindowViewModel.ModeSelection; switch (mode.ViewMode) { case MainWindowViewModel.ViewMode.Normal: HideAllGrids(); GridNormalMode.Visibility = Visibility.Visible; TxtSearch.Focus(); return; case MainWindowViewModel.ViewMode.Player: HideAllGrids(); GridPlayerMode.Visibility = Visibility.Visible; TxtBoxPlayerModeUsername.Focus(); return; case MainWindowViewModel.ViewMode.Gold: HideAllGrids(); GridGoldMode.Visibility = Visibility.Visible; return; } }