private static void OnFirstDayOfWeekChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Calendar c = d as Calendar;
Debug.Assert(c != null, "c should not be null!");
if (IsValidFirstDayOfWeek(e.NewValue))
{
c.UpdateMonths();
}
else
{
throw new ArgumentOutOfRangeException("d", WinRTXamlToolkit.Controls.Properties.Resources.Calendar_OnFirstDayOfWeekChanged_InvalidValue);
}
}