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

EnsureCalendarButtonStyle() private static method

Inherited code: Requires comment.
private static EnsureCalendarButtonStyle ( CalendarButton calendarButton, Style oldCalendarButtonStyle, Style newCalendarButtonStyle ) : void
calendarButton WinRTXamlToolkit.Controls.Primitives.CalendarButton Inherited code: Requires comment 1.
oldCalendarButtonStyle Windows.UI.Xaml.Style Inherited code: Requires comment 2.
newCalendarButtonStyle Windows.UI.Xaml.Style Inherited code: Requires comment 3.
return void
        private static void EnsureCalendarButtonStyle(CalendarButton calendarButton, Style oldCalendarButtonStyle, Style newCalendarButtonStyle)
        {
            Debug.Assert(calendarButton != null, "The calendarButton should not be null!");

            if (newCalendarButtonStyle != null)
            {
                // REMOVE_RTM: Remove null check when Silverlight allows us to re-apply styles
                // Apply the newCalendarButtonStyle if the CalendarButton was
                // using the oldCalendarButtonStyle before
                if (calendarButton != null && (calendarButton.Style == null || calendarButton.Style == oldCalendarButtonStyle))
                {
                    calendarButton.Style = newCalendarButtonStyle;
                }
            }
        }
        #endregion CalendarButtonStyle