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

OnIsTodayHighlightedChanged() private static method

IsTodayHighlightedProperty property changed handler.
private static OnIsTodayHighlightedChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void
d Windows.UI.Xaml.DependencyObject /// Calendar that changed its IsTodayHighlighted. ///
e Windows.UI.Xaml.DependencyPropertyChangedEventArgs The DependencyPropertyChangedEventArgs.
return void
        private static void OnIsTodayHighlightedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Calendar c = d as Calendar;
            Debug.Assert(c != null, "c should not be null!");

            if (c.DisplayDate != null)
            {
                int i = DateTimeHelper.CompareYearMonth(c.DisplayDateInternal, DateTime.Today);

                if (i > -2 && i < 2)
                {
                    c.UpdateMonths();
                }
            }
        }
        #endregion IsTodayHighlighted