private static void EnsureMonthStyle(CalendarItem month, Style oldMonthStyle, Style newMonthStyle)
{
Debug.Assert(month != null, "month should not be null!");
if (newMonthStyle != null)
{
// REMOVE_RTM: Remove null check when Silverlight allows us to re-apply styles
// Apply the newMonthStyle if the Month was using the
// oldMonthStyle before
if (month != null && (month.Style == null || month.Style == oldMonthStyle))
{
month.Style = newMonthStyle;
}
}
}
#endregion CalendarItemStyle