2 writes to Owner
PresentationFramework (2)
System\Windows\Controls\Calendar.cs (2)
746
_monthControl?.
Owner
= null;
752
_monthControl?.
Owner
= this;
131 references to Owner
PresentationFramework (131)
System\Windows\Controls\Primitives\CalendarItem.cs (131)
102
return (this.
Owner
!= null) ? this.
Owner
.DisplayMode : CalendarMode.Month;
134
return (
Owner
!= null) ?
Owner
.DisplayDate : DateTime.Today;
196
if (this.
Owner
!= null)
198
switch (this.
Owner
.DisplayMode)
253
this.
Owner
.DisplayMode == CalendarMode.Month &&
254
this.
Owner
.HoverEnd.HasValue)
256
FinishSelection(this.
Owner
.HoverEnd.Value);
279
if (this.
Owner
!= null)
281
selectedYear = this.
Owner
.DisplayYear;
502
if (this.
Owner
!= null)
504
this.
Owner
.CurrentDate = selectedDate;
506
if (this.
Owner
.HoverStart.HasValue)
510
DateTime.Compare(this.
Owner
.HoverStart.Value, selectedDate) == 0 &&
511
(
Owner
.SelectionMode == CalendarSelectionMode.SingleDate ||
Owner
.SelectionMode == CalendarSelectionMode.MultipleRange))
514
this.
Owner
.SelectedDates.Toggle(selectedDate);
520
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.HoverStart.Value, selectedDate);
523
Owner
.OnDayClick(selectedDate);
532
if (this.
Owner
== null)
537
this.
Owner
.OnDayOrMonthPreviewKeyDown(e);
542
if (this.
Owner
== null)
563
switch (this.
Owner
.SelectionMode)
574
this.
Owner
.SelectedDate = clickedDate;
578
this.
Owner
.SelectedDates.Toggle(clickedDate);
586
DateTime? lastDate = this.
Owner
.CurrentDate;
587
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
590
this.
Owner
.SelectedDates.AddRangeInternal(lastDate.Value, clickedDate);
594
this.
Owner
.SelectedDate = clickedDate;
595
this.
Owner
.HoverStart = null;
596
this.
Owner
.HoverEnd = null;
606
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
611
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.CurrentDate, clickedDate);
617
this.
Owner
.SelectedDate = clickedDate;
621
this.
Owner
.SelectedDates.Toggle(clickedDate);
622
this.
Owner
.HoverStart = null;
623
this.
Owner
.HoverEnd = null;
631
this.
Owner
.OnDayClick(clickedDate);
644
if (this.
Owner
== null || !(b.DataContext is DateTime))
651
this.
Owner
.HoverStart = null;
665
switch (this.
Owner
.SelectionMode)
674
this.
Owner
.DatePickerDisplayDateFlag = true;
677
this.
Owner
.SelectedDate = selectedDate;
681
this.
Owner
.SelectedDates.Toggle(selectedDate);
689
this.
Owner
.SelectedDates.ClearInternal();
693
if (!this.
Owner
.HoverStart.HasValue)
695
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
700
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
710
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;
729
this.
Owner
.CurrentDate = selectedDate;
730
this.
Owner
.UpdateCellItems();
751
if (this.
Owner
== null || !(b.DataContext is DateTime))
758
switch (this.
Owner
.SelectionMode)
762
this.
Owner
.DatePickerDisplayDateFlag = true;
763
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = null;
764
if (this.
Owner
.SelectedDates.Count == 0)
766
this.
Owner
.SelectedDates.Add(selectedDate);
770
this.
Owner
.SelectedDates[0] = selectedDate;
777
this.
Owner
.HoverEnd = selectedDate;
778
this.
Owner
.CurrentDate = selectedDate;
779
this.
Owner
.UpdateCellItems();
792
if (this.
Owner
== null)
799
this.
Owner
.OnDayButtonMouseUp(e);
816
if (this.
Owner
.SelectionMode == CalendarSelectionMode.None || this.
Owner
.SelectionMode == CalendarSelectionMode.SingleDate)
818
this.
Owner
.OnDayClick(selectedDate);
822
if (this.
Owner
.HoverStart.HasValue)
824
switch (this.
Owner
.SelectionMode)
829
this.
Owner
.SelectedDates.ClearInternal();
848
this.
Owner
.OnDayClick(selectedDate);
861
this.
Owner
?.OnCalendarButtonPressed(b, false);
868
if (b != null && this.
Owner
!= null)
870
this.
Owner
.OnCalendarButtonPressed(b, true);
879
if (this._isMonthPressed && this.
Owner
!= null)
881
this.
Owner
.OnCalendarButtonPressed(b, false);
891
this.
Owner
.OnCalendarButtonPressed(b, true);
897
if (this.
Owner
!= null)
899
if (this.
Owner
.DisplayMode == CalendarMode.Month)
901
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Year);
905
Debug.Assert(this.
Owner
.DisplayMode == CalendarMode.Year);
907
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Decade);
916
this.
Owner
?.OnPreviousClick();
921
this.
Owner
?.OnNextClick();
942
Owner = this.
Owner
969
Owner = this.
Owner
1002
if (this.
Owner
!= null)
1004
daytitle.DataContext = shortestDayNames[(childIndex + (int)this.
Owner
.FirstDayOfWeek) % shortestDayNames.Length];
1051
if (this.
Owner
!= null)
1058
if (DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateEndInternal) > 0)
1070
this.
Owner
.BlackoutDates.Contains(dateToAdd.Value));
1075
DateTimeHelper.CompareYearMonth(dateToAdd.Value, this.
Owner
.DisplayDateInternal) != 0);
1094
foreach (DateTime item in this.
Owner
.SelectedDates)
1116
var owner = this.
Owner
;
1172
if (this.
Owner
!= null)
1181
if (this.
Owner
!= null && _nextButton != null)
1195
_nextButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateEndInternal, firstDayOfNextMonth) > -1);
1202
if (this.
Owner
!= null && _previousButton != null)
1205
_previousButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateStartInternal, firstDayOfMonth) < 0);
1231
if (this.
Owner
!= null)
1233
childButton.HasSelectedDays = (
Owner
.DisplayDate.Year == year);
1235
if (year < this.
Owner
.DisplayDateStartInternal.Year || year > this.
Owner
.DisplayDateEndInternal.Year)
1275
if (this.
Owner
!= null)
1277
childButton.HasSelectedDays = (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateInternal) == 0);
1279
if (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateEndInternal) > 0)
1307
if (this.
Owner
!= null && _nextButton != null)
1309
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year != DisplayDate.Year);
1315
if (this.
Owner
!= null && _previousButton != null)
1317
_previousButton.IsEnabled = (this.
Owner
.DisplayDateStartInternal.Year != DisplayDate.Year);
1336
if (this.
Owner
!= null && _nextButton != null)
1338
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year > decadeEnd);
1344
if (this.
Owner
!= null && _previousButton != null)
1346
_previousButton.IsEnabled = (decade > this.
Owner
.DisplayDateStartInternal.Year);
1358
if (this.
Owner
!= null)
1360
i = ((day - this.
Owner
.FirstDayOfWeek + NUMBER_OF_DAYS_IN_WEEK) % NUMBER_OF_DAYS_IN_WEEK);
1386
Source = this.
Owner