private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { Button senderButton = (Button)sender; _displayCalendarViewModel.CurrentDay = Int32.Parse(senderButton.Content.ToString()); _displayCalendarViewModel.ToggleDisplayMode(); }
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { if (sender is Button senderButton) { int selectedDay = Int32.Parse(senderButton.Content.ToString().Replace("*", "", System.StringComparison.InvariantCulture), applicationCulture); displayCalendarViewModel.CurrentDay = selectedDay; } displayCalendarViewModel.ToggleDisplayMode(); }