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) 413supportedViews[0] = (int)CalendarMode.Month; 414supportedViews[1] = (int)CalendarMode.Year; 415supportedViews[2] = (int)CalendarMode.Decade; 445this.OwningCalendar.DisplayMode = (CalendarMode)viewId; 474AutomationPeer peer = GetOrCreateDateTimeAutomationPeer(date, CalendarMode.Month); 505CalendarMode currentMode = 0; 509currentMode = CalendarMode.Month; 556private DateTime? GetNextDate(DateTimeAutomationPeer currentDatePeer, CalendarMode currentMode) 562if (currentMode == CalendarMode.Month) 564else if (currentMode == CalendarMode.Year) 566else if (currentMode == CalendarMode.Decade) 615if (this.OwningCalendar.DisplayMode == CalendarMode.Month) 677internal DateTimeCalendarModePair(DateTime date, CalendarMode mode) 683CalendarMode 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)); 917CalendarMode newMode = CalendarMode.Month; 921case CalendarMode.Month: 927case CalendarMode.Year: 930newMode = CalendarMode.Month; 934case CalendarMode.Decade: 937newMode = CalendarMode.Year; 952FocusDate(this.DisplayMode == CalendarMode.Month ? this.CurrentDate : this.DisplayDate); 958private DateTime? GetDateOffset(DateTime date, int offset, CalendarMode displayMode) 963case CalendarMode.Month: 969case CalendarMode.Year: 975case CalendarMode.Decade: 996case CalendarMode.Month: 1005case CalendarMode.Year: 1006case CalendarMode.Decade: 1068case CalendarMode.Month: 1074case CalendarMode.Year: 1080case CalendarMode.Decade: 1136CalendarMode mode = (CalendarMode)value; 1138return mode == CalendarMode.Month 1139|| mode == CalendarMode.Year 1140|| mode == CalendarMode.Decade; 1189Debug.Assert(this.DisplayMode == CalendarMode.Year); 1202Debug.Assert(this.DisplayMode == CalendarMode.Decade); 1247if (this.DisplayMode == CalendarMode.Month) 1326case CalendarMode.Month: 1337case CalendarMode.Year: 1341this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Month); 1353case CalendarMode.Decade: 1357this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Year); 1375case CalendarMode.Month: 1395case CalendarMode.Year: 1402case CalendarMode.Decade: 1415case CalendarMode.Year: 1417this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Month); 1422case CalendarMode.Decade: 1424this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Year); 1437case CalendarMode.Month: 1445case CalendarMode.Year: 1452case CalendarMode.Decade: 1466case CalendarMode.Month: 1473case CalendarMode.Year: 1480case CalendarMode.Decade: 1493case CalendarMode.Month: 1500case CalendarMode.Year: 1507case CalendarMode.Decade: 1520case CalendarMode.Month: 1527case CalendarMode.Year: 1534case CalendarMode.Decade: 1548case CalendarMode.Month: 1555case CalendarMode.Year: 1562case CalendarMode.Decade: 1654case CalendarMode.Month: 1658this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Year); 1670case CalendarMode.Year: 1674this.SetCurrentValueInternal(DisplayModeProperty, CalendarMode.Decade); 1686case 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);