2 writes to Owner
PresentationFramework (2)
src\Framework\System\Windows\Controls\Calendar.cs (2)
754
_monthControl.
Owner
= null;
763
_monthControl.
Owner
= this;
135 references to Owner
PresentationFramework (135)
src\Framework\System\Windows\Controls\Primitives\CalendarItem.cs (135)
109
return (this.
Owner
!= null) ? this.
Owner
.DisplayMode : CalendarMode.Month;
141
return (
Owner
!= null) ?
Owner
.DisplayDate : DateTime.Today;
217
if (this.
Owner
!= null)
219
switch (this.
Owner
.DisplayMode)
274
this.
Owner
.DisplayMode == CalendarMode.Month &&
275
this.
Owner
.HoverEnd.HasValue)
277
FinishSelection(this.
Owner
.HoverEnd.Value);
300
if (this.
Owner
!= null)
302
selectedYear = this.
Owner
.DisplayYear;
523
if (this.
Owner
!= null)
525
this.
Owner
.CurrentDate = selectedDate;
527
if (this.
Owner
.HoverStart.HasValue)
531
DateTime.Compare(this.
Owner
.HoverStart.Value, selectedDate) == 0 &&
532
(
Owner
.SelectionMode == CalendarSelectionMode.SingleDate ||
Owner
.SelectionMode == CalendarSelectionMode.MultipleRange))
535
this.
Owner
.SelectedDates.Toggle(selectedDate);
541
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.HoverStart.Value, selectedDate);
544
Owner
.OnDayClick(selectedDate);
553
if (this.
Owner
== null)
558
this.
Owner
.OnDayOrMonthPreviewKeyDown(e);
563
if (this.
Owner
== null)
584
switch (this.
Owner
.SelectionMode)
595
this.
Owner
.SelectedDate = clickedDate;
599
this.
Owner
.SelectedDates.Toggle(clickedDate);
607
DateTime? lastDate = this.
Owner
.CurrentDate;
608
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
611
this.
Owner
.SelectedDates.AddRangeInternal(lastDate.Value, clickedDate);
615
this.
Owner
.SelectedDate = clickedDate;
616
this.
Owner
.HoverStart = null;
617
this.
Owner
.HoverEnd = null;
627
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
632
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.CurrentDate, clickedDate);
638
this.
Owner
.SelectedDate = clickedDate;
642
this.
Owner
.SelectedDates.Toggle(clickedDate);
643
this.
Owner
.HoverStart = null;
644
this.
Owner
.HoverEnd = null;
652
this.
Owner
.OnDayClick(clickedDate);
665
if (this.
Owner
== null || !(b.DataContext is DateTime))
672
this.
Owner
.HoverStart = null;
687
switch (this.
Owner
.SelectionMode)
696
this.
Owner
.DatePickerDisplayDateFlag = true;
699
this.
Owner
.SelectedDate = selectedDate;
703
this.
Owner
.SelectedDates.Toggle(selectedDate);
711
this.
Owner
.SelectedDates.ClearInternal();
715
if (!this.
Owner
.HoverStart.HasValue)
717
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
722
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
732
this.
Owner
.SelectedDates.ClearInternal();
737
if (!this.
Owner
.HoverStart.HasValue)
739
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
744
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
751
this.
Owner
.CurrentDate = selectedDate;
752
this.
Owner
.UpdateCellItems();
773
if (this.
Owner
== null || !(b.DataContext is DateTime))
780
switch (this.
Owner
.SelectionMode)
784
this.
Owner
.DatePickerDisplayDateFlag = true;
785
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = null;
786
if (this.
Owner
.SelectedDates.Count == 0)
788
this.
Owner
.SelectedDates.Add(selectedDate);
792
this.
Owner
.SelectedDates[0] = selectedDate;
799
this.
Owner
.HoverEnd = selectedDate;
800
this.
Owner
.CurrentDate = selectedDate;
801
this.
Owner
.UpdateCellItems();
814
if (this.
Owner
== null)
821
this.
Owner
.OnDayButtonMouseUp(e);
838
if (this.
Owner
.SelectionMode == CalendarSelectionMode.None || this.
Owner
.SelectionMode == CalendarSelectionMode.SingleDate)
840
this.
Owner
.OnDayClick(selectedDate);
844
if (this.
Owner
.HoverStart.HasValue)
846
switch (this.
Owner
.SelectionMode)
851
this.
Owner
.SelectedDates.ClearInternal();
870
this.
Owner
.OnDayClick(selectedDate);
883
if (this.
Owner
!= null)
885
this.
Owner
.OnCalendarButtonPressed(b, false);
893
if (b != null && this.
Owner
!= null)
895
this.
Owner
.OnCalendarButtonPressed(b, true);
904
if (this._isMonthPressed && this.
Owner
!= null)
906
this.
Owner
.OnCalendarButtonPressed(b, false);
916
this.
Owner
.OnCalendarButtonPressed(b, true);
922
if (this.
Owner
!= null)
924
if (this.
Owner
.DisplayMode == CalendarMode.Month)
926
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Year);
930
Debug.Assert(this.
Owner
.DisplayMode == CalendarMode.Year);
932
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Decade);
941
if (this.
Owner
!= null)
943
this.
Owner
.OnPreviousClick();
949
if (this.
Owner
!= null)
951
this.
Owner
.OnNextClick();
973
dayCell.Owner = this.
Owner
;
999
monthCell.Owner = this.
Owner
;
1032
if (this.
Owner
!= null)
1034
daytitle.DataContext = shortestDayNames[(childIndex + (int)this.
Owner
.FirstDayOfWeek) % shortestDayNames.Length];
1081
if (this.
Owner
!= null)
1088
if (DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateEndInternal) > 0)
1100
this.
Owner
.BlackoutDates.Contains(dateToAdd.Value));
1105
DateTimeHelper.CompareYearMonth(dateToAdd.Value, this.
Owner
.DisplayDateInternal) != 0);
1124
foreach (DateTime item in this.
Owner
.SelectedDates)
1146
var owner = this.
Owner
;
1203
if (this.
Owner
!= null)
1212
if (this.
Owner
!= null && _nextButton != null)
1226
_nextButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateEndInternal, firstDayOfNextMonth) > -1);
1233
if (this.
Owner
!= null && _previousButton != null)
1236
_previousButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateStartInternal, firstDayOfMonth) < 0);
1262
if (this.
Owner
!= null)
1264
childButton.HasSelectedDays = (
Owner
.DisplayDate.Year == year);
1266
if (year < this.
Owner
.DisplayDateStartInternal.Year || year > this.
Owner
.DisplayDateEndInternal.Year)
1306
if (this.
Owner
!= null)
1308
Debug.Assert(this.
Owner
.DisplayDateInternal != null);
1309
childButton.HasSelectedDays = (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateInternal) == 0);
1311
if (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateEndInternal) > 0)
1339
if (this.
Owner
!= null && _nextButton != null)
1341
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year != DisplayDate.Year);
1347
if (this.
Owner
!= null && _previousButton != null)
1349
_previousButton.IsEnabled = (this.
Owner
.DisplayDateStartInternal.Year != DisplayDate.Year);
1368
if (this.
Owner
!= null && _nextButton != null)
1370
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year > decadeEnd);
1376
if (this.
Owner
!= null && _previousButton != null)
1378
_previousButton.IsEnabled = (decade > this.
Owner
.DisplayDateStartInternal.Year);
1390
if (this.
Owner
!= null)
1392
i = ((day - this.
Owner
.FirstDayOfWeek + NUMBER_OF_DAYS_IN_WEEK) % NUMBER_OF_DAYS_IN_WEEK);
1417
result.Source = this.
Owner
;