WinRTXamlToolkit.Controls.Calendar.EnsureDayButtonStyle C# (CSharp) Method

EnsureDayButtonStyle() private static method

Inherited code: Requires comment.
private static EnsureDayButtonStyle ( CalendarDayButton dayButton, Style oldDayButtonStyle, Style newDayButtonStyle ) : void
dayButton WinRTXamlToolkit.Controls.Primitives.CalendarDayButton Inherited code: Requires comment 1.
oldDayButtonStyle Windows.UI.Xaml.Style Inherited code: Requires comment 2.
newDayButtonStyle Windows.UI.Xaml.Style Inherited code: Requires comment 3.
return void
        private static void EnsureDayButtonStyle(CalendarDayButton dayButton, Style oldDayButtonStyle, Style newDayButtonStyle)
        {
            Debug.Assert(dayButton != null, "The dayButton should not be null!");

            if (newDayButtonStyle != null)
            {
                // REMOVE_RTM: Remove null check when Silverlight allows us to re-apply styles
                // Apply the newDayButtonStyle if the DayButton was using the
                // oldDayButtonStyle before
                if (dayButton != null && (dayButton.Style == null || dayButton.Style == oldDayButtonStyle))
                {
                    dayButton.Style = newDayButtonStyle;
                }
            }
        }
        #endregion CalendarDayButtonStyle