internal void UnHighlightDays()
{
if (HoverEnd != null && HoverStart != null)
{
CalendarItem monthControl = MonthControl;
CalendarDayButton b;
DateTime? d;
if (HoverEndIndex != null && HoverStartIndex != null)
{
int startIndex, endIndex, i;
SortHoverIndexes(out startIndex, out endIndex);
if (SelectionMode == CalendarSelectionMode.MultipleRange)
{
for (i = startIndex; i <= endIndex; i++)
{
b = monthControl.MonthView.Children[i] as CalendarDayButton;
d = b.DataContext as DateTime?;
if (d.HasValue)
{
if (!SelectedDates.Contains(d.Value))
{
b.IsSelected = false;
}
}
}
}
else
{
// It is SingleRange
for (i = startIndex; i <= endIndex; i++)
{
(monthControl.MonthView.Children[i] as CalendarDayButton).IsSelected = false;
}
}
}
}
}