Ejemplo n.º 1
0
        private void UpdateYear(int YearsToAdd)
        {
            MonthChangedEventArgs ev = new MonthChangedEventArgs();

            ev.OldDisplayStartDate = _DisplayStartDate;
            this.DisplayStartDate  = _DisplayStartDate.AddYears(YearsToAdd);
            ev.NewDisplayStartDate = _DisplayStartDate;
            DisplayMonthChanged?.Invoke(ev);
            BuildCalendarUI();
        }
Ejemplo n.º 2
0
        protected override void OnChangedCurrent(FrameworkElement oldEl, FrameworkElement newEl)
        {
            if (oldEl != null)
            {
                (oldEl as TCalendarGrid).SelectionChanged -= CalendarPicker_SelectionChanged;
            }

            if (newEl != null)
            {
                (newEl as TCalendarGrid).SelectionChanged += CalendarPicker_SelectionChanged;
            }

            DisplayMonthChanged?.Invoke(this, new EventArgs());
            DisplayMonth = this.GetCurrentDisplayMonth();
        }