Inheritance: System.Windows.RoutedEventArgs
 private void Calendar_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
 {
     if (e.NewMode == CalendarMode.Month)
     {
         this.cal.DisplayMode = CalendarMode.Year;
     }
 }
        private static void CalendarOnDisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
        {
            var calendar = (Calendar)sender;
            if (calendar.DisplayMode != CalendarMode.Month)
                return;

            calendar.SelectedDate = GetSelectedCalendarDate(calendar.DisplayDate);

            var datePicker = GetCalendarsDatePicker(calendar);
            datePicker.IsDropDownOpen = false;
        }
Esempio n. 3
0
        private static void CalendarOnDisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
        {
            var calendar = (Calendar)sender;

            if (calendar.DisplayMode >= _mode)
            {
                return;
            }
            calendar.SelectedDate = GetSelectedCalendarDate(calendar.DisplayDate);
            var datePicker = GetCalendarsDatePicker(calendar);

            datePicker.IsDropDownOpen = false;
        }
        /// <summary>
        /// Inherited code: Requires comment.
        /// </summary>
        /// <param name="args">Inherited code: Requires comment 1.</param>
        private void OnDisplayModeChanged(CalendarModeChangedEventArgs args)
        {
            EventHandler<CalendarModeChangedEventArgs> handler = DisplayModeChanged;

            if (null != handler)
            {
                handler(this, args);
            }
        }
Esempio n. 5
0
 private void calendar1_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
 {
     if (calendarReportesPagoRubro.DisplayMode != CalendarMode.Year)
     {
         calendarReportesPagoRubro.DisplayMode = CalendarMode.Year;
     }
     /*else 
     { 
         calendarReportesPagoRubro.DisplayMode = CalendarMode.Decade;
     }*/
 }
Esempio n. 6
0
 private void CalendarDisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
 {
     calendarControl.DisplayModeChanged -= CalendarDisplayModeChanged;
     if (calendarControl.DisplayMode == CalendarMode.Year)
     {
         dateDropContent.IsDropDownOpen = false;
         SetDropValue();
         calendarControl.DisplayMode = CalendarMode.Decade;
         calendarPopup.IsOpen = false;
         if (DateChangedEvent != null)
         {
             DateChangedEvent(this, new YearDataChangeArgs
             {
                 Year = Year,
                 DisplayDate = DisplayDate
             });
         } if (DropDownClosed != null)
             DropDownClosed(this, EventArgs.Empty);
     }
     calendarControl.DisplayModeChanged += CalendarDisplayModeChanged;
 }
Esempio n. 7
0
        private void calend_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
        {
            //if (calend.DisplayMode != CalendarMode.Year)
            //{
            //    calend.DisplayMode = CalendarMode.Year;
 
            //}
        }
 protected virtual new void OnDisplayModeChanged(CalendarModeChangedEventArgs e)
 {
 }
Esempio n. 9
0
        private void Calendar_DisplayModeChanged(object sender,
                                         CalendarModeChangedEventArgs e)
        {
            Calendar calObj = sender as Calendar;

            calObj.DisplayMode = CalendarMode.Year;
              FillData();
        }
 /// <summary>
 ///  Sélection d'un vue --> impossible de voir la vue générale des années
 /// </summary>
 /// <param name="sender">L'objet</param>
 /// <param name="e">Le calendrier</param>
 private void changementVue(object sender, CalendarModeChangedEventArgs e) {
     if (calendrier_prog.DisplayMode == CalendarMode.Decade) {
         calendrier_prog.DisplayMode = CalendarMode.Month;
     }
 }
Esempio n. 11
0
 private void CalDate_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
 {
     if (CalDate != null && CalDate.DisplayMode != CalendarMode.Year)
         CalDate.DisplayMode = CalendarMode.Year;
 }
Esempio n. 12
0
 protected virtual new void OnDisplayModeChanged(CalendarModeChangedEventArgs e)
 {
 }
Esempio n. 13
0
        void CurrentCalendar_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
        {
            this.CurrentCalendar.DisplayModeChanged -= CurrentCalendar_DisplayModeChanged;
            this.CurrentCalendar.DisplayModeChanged += CurrentCalendar_DisplayModeChanged;
            Calendar cal = (Calendar)sender;

            //首次加载以及重新赋值DisplayMode  Calendar视图情况判断
            if (e.OldMode.Equals(CalendarMode.Year) && !e.NewMode.Equals(CalendarMode.Month))
                cal.DisplayMode = e.NewMode;
            else
                cal.DisplayMode = this.DateMode;

            //仅选择月 Calendar关闭情况判断
            if (e.NewMode.Equals(CalendarMode.Month))
                this.CurrentPopup.IsOpen = false;

            //只选择年。 Calendar 关闭情况判断
            if (this.DateMode == CalendarMode.Decade && e.NewMode == CalendarMode.Year && e.OldMode == this.DateMode)
                this.CurrentPopup.IsOpen = false;
        }
 public void OnDisplayModeChanged(CalendarModeChangedEventArgs args, bool useTransitions = true) {
     OnDisplayModeChanged(args.OldMode, args.NewMode, useTransitions);
 }
Esempio n. 15
0
 /// <summary>
 /// Raises the <see cref="E:Kavand.Windows.Controls.Calendar.DisplayModeChanged"/> event.
 /// </summary>
 /// <param name="e">The data for the event. </param>
 protected virtual void OnDisplayModeChanged(CalendarModeChangedEventArgs e) {
     var eventHandler = _displayModeChanged;
     if (eventHandler != null)
         eventHandler(this, e);
 }
Esempio n. 16
0
        protected virtual void OnDisplayModeChanged(CalendarModeChangedEventArgs e)
        { 
            EventHandler<CalendarModeChangedEventArgs> handler = this.DisplayModeChanged;

            if (handler != null)
            { 
                handler(this, e);
            } 
        } 
Esempio n. 17
0
 private static void OnDisplayModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
     var calendar = (Calendar)d;
     var newMode = (CalendarMode)e.NewValue;
     var oldMode = (CalendarMode)e.OldValue;
     switch (newMode) {
         case CalendarMode.Month:
             if (oldMode == CalendarMode.Year || oldMode == CalendarMode.Decade) {
                 calendar.HoverEnd = null;
                 calendar.HoverStart = null;
                 calendar.CurrentDate = calendar.DisplayDate;
             }
             calendar.UpdatePresenter();
             break;
         case CalendarMode.Year:
         case CalendarMode.Decade:
             if (oldMode == CalendarMode.Month)
                 calendar.SetCurrentValue(DisplayDateProperty, calendar.CurrentDate);
             calendar.UpdatePresenter();
             break;
     }
     var args = new CalendarModeChangedEventArgs(oldMode, newMode);
     if (calendar._viewPresenter != null)
         calendar._viewPresenter.OnDisplayModeChanged(args);
     calendar.OnDisplayModeChanged(args);
 }
Esempio n. 18
0
 private void _calendar_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
 {
     _calendar.DisplayMode = CalendarMode.Year;
 }