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

HighlightDays() private method

This method highlights the days in MultiSelection mode without adding them to the SelectedDates collection.
private HighlightDays ( ) : void
return void
        internal void HighlightDays()
        {
            if (HoverEnd != null && HoverStart != null)
            {
                int startIndex, endIndex, i;
                CalendarDayButton b;
                DateTime? d;
                CalendarItem monthControl = MonthControl;

                // This assumes a contiguous set of dates:
                if (HoverEndIndex != null && HoverStartIndex != null)
                {
                    SortHoverIndexes(out startIndex, out endIndex);

                    for (i = startIndex; i <= endIndex; i++)
                    {
                        b = monthControl.MonthView.Children[i] as CalendarDayButton;
                        b.IsSelected = true;
                        d = b.DataContext as DateTime?;

                        if (d.HasValue && DateTimeHelper.CompareDays(HoverEnd.Value, d.Value) == 0)
                        {
                            if (FocusButton != null)
                            {
                                FocusButton.IsCurrent = false;
                            }
                            b.IsCurrent = HasFocusInternal;
                            FocusButton = b;
                        }
                    }
                }
            }
        }