124 references to CalendarMode
PresentationFramework (124)
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (23)
43if (this.OwningCalendar.DisplayMode == CalendarMode.Month) 138if (OwningCalendar.DisplayMode == CalendarMode.Month && childRow == 0) 212private DateTimeAutomationPeer GetOrCreateDateTimeAutomationPeer(DateTime date, CalendarMode buttonMode) 217private DateTimeAutomationPeer GetOrCreateDateTimeAutomationPeer(DateTime date, CalendarMode buttonMode, bool addParentInfo) 296DateTimeAutomationPeer peer = GetOrCreateDateTimeAutomationPeer((DateTime)e.AddedItems[0], CalendarMode.Month); 308DateTimeAutomationPeer peer = GetOrCreateDateTimeAutomationPeer(date, CalendarMode.Month); 321DateTimeAutomationPeer peer = GetOrCreateDateTimeAutomationPeer(date, CalendarMode.Month); 353if (this.OwningCalendar.DisplayMode == CalendarMode.Month) 370if (this.OwningCalendar.DisplayMode == CalendarMode.Month) 414supportedViews[0] = (int)CalendarMode.Month; 415supportedViews[1] = (int)CalendarMode.Year; 416supportedViews[2] = (int)CalendarMode.Decade; 446this.OwningCalendar.DisplayMode = (CalendarMode)viewId; 475AutomationPeer peer = GetOrCreateDateTimeAutomationPeer(date, CalendarMode.Month); 506CalendarMode currentMode = 0; 510currentMode = CalendarMode.Month; 557private DateTime? GetNextDate(DateTimeAutomationPeer currentDatePeer, CalendarMode currentMode) 563if (currentMode == CalendarMode.Month) 565else if (currentMode == CalendarMode.Year) 567else if (currentMode == CalendarMode.Decade) 616if (this.OwningCalendar.DisplayMode == CalendarMode.Month) 678internal DateTimeCalendarModePair(DateTime date, CalendarMode mode) 684CalendarMode ButtonMode;
System\Windows\Automation\Peers\DateTimeAutomationPeer.cs (6)
23internal DateTimeAutomationPeer(DateTime date, Calendar owningCalendar, CalendarMode buttonMode) 64internal CalendarMode ButtonMode 74return ButtonMode == CalendarMode.Month; 316case CalendarMode.Month: 319case CalendarMode.Year: 322case CalendarMode.Decade:
System\Windows\Controls\Calendar.cs (73)
358public CalendarMode DisplayMode 360get { return (CalendarMode)GetValue(DisplayModeProperty); } 370typeof(CalendarMode), 372new FrameworkPropertyMetadata(CalendarMode.Month, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayModePropertyChanged), 384CalendarMode mode = (CalendarMode)e.NewValue; 385CalendarMode oldMode = (CalendarMode)e.OldValue; 390case CalendarMode.Month: 392if (oldMode == CalendarMode.Year || oldMode == CalendarMode.Decade) 403case CalendarMode.Year: 404case CalendarMode.Decade: 405if (oldMode == CalendarMode.Month) 418c.OnDisplayModeChanged(new CalendarModeChangedEventArgs((CalendarMode)e.OldValue, mode)); 919CalendarMode newMode = CalendarMode.Month; 923case CalendarMode.Month: 929case CalendarMode.Year: 932newMode = CalendarMode.Month; 936case CalendarMode.Decade: 939newMode = CalendarMode.Year; 954FocusDate(this.DisplayMode == CalendarMode.Month ? this.CurrentDate : this.DisplayDate); 960private DateTime? GetDateOffset(DateTime date, int offset, CalendarMode displayMode) 965case CalendarMode.Month: 971case CalendarMode.Year: 977case CalendarMode.Decade: 998case CalendarMode.Month: 1007case CalendarMode.Year: 1008case CalendarMode.Decade: 1070case CalendarMode.Month: 1076case CalendarMode.Year: 1082case CalendarMode.Decade: 1138CalendarMode mode = (CalendarMode)value; 1140return mode == CalendarMode.Month 1141|| mode == CalendarMode.Year 1142|| mode == CalendarMode.Decade; 1191Debug.Assert(this.DisplayMode == CalendarMode.Year); 1204Debug.Assert(this.DisplayMode == CalendarMode.Decade); 1249if (this.DisplayMode == CalendarMode.Month) 1328case CalendarMode.Month: 1339case CalendarMode.Year: 1343this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Month); 1355case CalendarMode.Decade: 1359this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Year); 1377case CalendarMode.Month: 1397case CalendarMode.Year: 1404case CalendarMode.Decade: 1417case CalendarMode.Year: 1419this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Month); 1424case CalendarMode.Decade: 1426this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Year); 1439case CalendarMode.Month: 1447case CalendarMode.Year: 1454case CalendarMode.Decade: 1468case CalendarMode.Month: 1475case CalendarMode.Year: 1482case CalendarMode.Decade: 1495case CalendarMode.Month: 1502case CalendarMode.Year: 1509case CalendarMode.Decade: 1522case CalendarMode.Month: 1529case CalendarMode.Year: 1536case CalendarMode.Decade: 1550case CalendarMode.Month: 1557case CalendarMode.Year: 1564case CalendarMode.Decade: 1656case CalendarMode.Month: 1660this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Year); 1672case CalendarMode.Year: 1676this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Decade); 1688case CalendarMode.Decade:
System\Windows\Controls\CalendarModeChangedEventArgs.cs (4)
18public CalendarModeChangedEventArgs(CalendarMode oldMode, CalendarMode newMode) 27public CalendarMode NewMode 36public CalendarMode OldMode
System\Windows\Controls\DatePicker.cs (2)
918this._calendar.DisplayMode = CalendarMode.Month; 953if (args.Key == Key.Escape || ((args.Key == Key.Enter || args.Key == Key.Space) && c.DisplayMode == CalendarMode.Month))
System\Windows\Controls\Primitives\CalendarItem.cs (16)
99private CalendarMode DisplayMode 103return (this.Owner != null) ? this.Owner.DisplayMode : CalendarMode.Month; 215case CalendarMode.Year: 218case CalendarMode.Decade: 221case CalendarMode.Month: 268this.Owner.DisplayMode == CalendarMode.Month && 389internal CalendarButton GetCalendarButton(DateTime date, CalendarMode mode) 391Debug.Assert(mode != CalendarMode.Month); 397if (mode == CalendarMode.Year) 448case CalendarMode.Month: 454case CalendarMode.Year: 455case CalendarMode.Decade: 917if (this.Owner.DisplayMode == CalendarMode.Month) 919this.Owner.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Year); 923Debug.Assert(this.Owner.DisplayMode == CalendarMode.Year); 925this.Owner.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Decade);