private void SetLastMonthAsCurrent() { MonthsComboBox.SelectedItem = MonthsComboBox.Items.GetItemAt(MonthsComboBox.Items.Count - 1); _selectedMonth = _mainViewModel.Months.LastOrDefault(); MonthChanged(); }
private void MonthsComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { _selectedMonth = MonthsComboBox.SelectedItem as Month; if (_selectedMonth == null) return; MonthChanged(); }