public void MoveToPrevious() { switch (Type) { case PeriodType.Day: SelectedDate = SelectedDate.AddDays(-1); break; case PeriodType.Week: SelectedDate = SelectedDate.AddDays(-7); break; case PeriodType.Month: SelectedDate = SelectedDate.AddMonths(-1); break; case PeriodType.Year: SelectedDate = SelectedDate.AddYears(-1); break; case PeriodType.All: /// intentionally blank space break; } CalculateDates(); OnPropertyChanged(nameof(Description)); }
private void BtnIncYear_Click(object sender, RoutedEventArgs e) { if (_currentPosition == DayMonthYear.Year) { SelectedDate = SelectedDate.AddYears(15); } else { SelectedDate = SelectedDate.AddYears(1); } }