2 writes to Owner
PresentationFramework (2)
System\Windows\Controls\Calendar.cs (2)
748
_monthControl.
Owner
= null;
757
_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;
210
if (this.
Owner
!= null)
212
switch (this.
Owner
.DisplayMode)
267
this.
Owner
.DisplayMode == CalendarMode.Month &&
268
this.
Owner
.HoverEnd.HasValue)
270
FinishSelection(this.
Owner
.HoverEnd.Value);
293
if (this.
Owner
!= null)
295
selectedYear = this.
Owner
.DisplayYear;
516
if (this.
Owner
!= null)
518
this.
Owner
.CurrentDate = selectedDate;
520
if (this.
Owner
.HoverStart.HasValue)
524
DateTime.Compare(this.
Owner
.HoverStart.Value, selectedDate) == 0 &&
525
(
Owner
.SelectionMode == CalendarSelectionMode.SingleDate ||
Owner
.SelectionMode == CalendarSelectionMode.MultipleRange))
528
this.
Owner
.SelectedDates.Toggle(selectedDate);
534
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.HoverStart.Value, selectedDate);
537
Owner
.OnDayClick(selectedDate);
546
if (this.
Owner
== null)
551
this.
Owner
.OnDayOrMonthPreviewKeyDown(e);
556
if (this.
Owner
== null)
577
switch (this.
Owner
.SelectionMode)
588
this.
Owner
.SelectedDate = clickedDate;
592
this.
Owner
.SelectedDates.Toggle(clickedDate);
600
DateTime? lastDate = this.
Owner
.CurrentDate;
601
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
604
this.
Owner
.SelectedDates.AddRangeInternal(lastDate.Value, clickedDate);
608
this.
Owner
.SelectedDate = clickedDate;
609
this.
Owner
.HoverStart = null;
610
this.
Owner
.HoverEnd = null;
620
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
625
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.CurrentDate, clickedDate);
631
this.
Owner
.SelectedDate = clickedDate;
635
this.
Owner
.SelectedDates.Toggle(clickedDate);
636
this.
Owner
.HoverStart = null;
637
this.
Owner
.HoverEnd = null;
645
this.
Owner
.OnDayClick(clickedDate);
658
if (this.
Owner
== null || !(b.DataContext is DateTime))
665
this.
Owner
.HoverStart = null;
679
switch (this.
Owner
.SelectionMode)
688
this.
Owner
.DatePickerDisplayDateFlag = true;
691
this.
Owner
.SelectedDate = selectedDate;
695
this.
Owner
.SelectedDates.Toggle(selectedDate);
703
this.
Owner
.SelectedDates.ClearInternal();
707
if (!this.
Owner
.HoverStart.HasValue)
709
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
714
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
724
this.
Owner
.SelectedDates.ClearInternal();
729
if (!this.
Owner
.HoverStart.HasValue)
731
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
736
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
743
this.
Owner
.CurrentDate = selectedDate;
744
this.
Owner
.UpdateCellItems();
765
if (this.
Owner
== null || !(b.DataContext is DateTime))
772
switch (this.
Owner
.SelectionMode)
776
this.
Owner
.DatePickerDisplayDateFlag = true;
777
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = null;
778
if (this.
Owner
.SelectedDates.Count == 0)
780
this.
Owner
.SelectedDates.Add(selectedDate);
784
this.
Owner
.SelectedDates[0] = selectedDate;
791
this.
Owner
.HoverEnd = selectedDate;
792
this.
Owner
.CurrentDate = selectedDate;
793
this.
Owner
.UpdateCellItems();
806
if (this.
Owner
== null)
813
this.
Owner
.OnDayButtonMouseUp(e);
830
if (this.
Owner
.SelectionMode == CalendarSelectionMode.None || this.
Owner
.SelectionMode == CalendarSelectionMode.SingleDate)
832
this.
Owner
.OnDayClick(selectedDate);
836
if (this.
Owner
.HoverStart.HasValue)
838
switch (this.
Owner
.SelectionMode)
843
this.
Owner
.SelectedDates.ClearInternal();
862
this.
Owner
.OnDayClick(selectedDate);
875
this.
Owner
?.OnCalendarButtonPressed(b, false);
882
if (b != null && this.
Owner
!= null)
884
this.
Owner
.OnCalendarButtonPressed(b, true);
893
if (this._isMonthPressed && this.
Owner
!= null)
895
this.
Owner
.OnCalendarButtonPressed(b, false);
905
this.
Owner
.OnCalendarButtonPressed(b, true);
911
if (this.
Owner
!= null)
913
if (this.
Owner
.DisplayMode == CalendarMode.Month)
915
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Year);
919
Debug.Assert(this.
Owner
.DisplayMode == CalendarMode.Year);
921
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Decade);
930
this.
Owner
?.OnPreviousClick();
935
this.
Owner
?.OnNextClick();
956
Owner = this.
Owner
983
Owner = this.
Owner
1016
if (this.
Owner
!= null)
1018
daytitle.DataContext = shortestDayNames[(childIndex + (int)this.
Owner
.FirstDayOfWeek) % shortestDayNames.Length];
1065
if (this.
Owner
!= null)
1072
if (DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateEndInternal) > 0)
1084
this.
Owner
.BlackoutDates.Contains(dateToAdd.Value));
1089
DateTimeHelper.CompareYearMonth(dateToAdd.Value, this.
Owner
.DisplayDateInternal) != 0);
1108
foreach (DateTime item in this.
Owner
.SelectedDates)
1130
var owner = this.
Owner
;
1186
if (this.
Owner
!= null)
1195
if (this.
Owner
!= null && _nextButton != null)
1209
_nextButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateEndInternal, firstDayOfNextMonth) > -1);
1216
if (this.
Owner
!= null && _previousButton != null)
1219
_previousButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateStartInternal, firstDayOfMonth) < 0);
1245
if (this.
Owner
!= null)
1247
childButton.HasSelectedDays = (
Owner
.DisplayDate.Year == year);
1249
if (year < this.
Owner
.DisplayDateStartInternal.Year || year > this.
Owner
.DisplayDateEndInternal.Year)
1289
if (this.
Owner
!= null)
1291
childButton.HasSelectedDays = (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateInternal) == 0);
1293
if (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateEndInternal) > 0)
1321
if (this.
Owner
!= null && _nextButton != null)
1323
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year != DisplayDate.Year);
1329
if (this.
Owner
!= null && _previousButton != null)
1331
_previousButton.IsEnabled = (this.
Owner
.DisplayDateStartInternal.Year != DisplayDate.Year);
1350
if (this.
Owner
!= null && _nextButton != null)
1352
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year > decadeEnd);
1358
if (this.
Owner
!= null && _previousButton != null)
1360
_previousButton.IsEnabled = (decade > this.
Owner
.DisplayDateStartInternal.Year);
1372
if (this.
Owner
!= null)
1374
i = ((day - this.
Owner
.FirstDayOfWeek + NUMBER_OF_DAYS_IN_WEEK) % NUMBER_OF_DAYS_IN_WEEK);
1400
Source = this.
Owner