2 writes to Owner
PresentationFramework (2)
System\Windows\Controls\Calendar.cs (2)
753
_monthControl.
Owner
= null;
762
_monthControl.
Owner
= this;
134 references to Owner
PresentationFramework (134)
System\Windows\Controls\Primitives\CalendarItem.cs (134)
108
return (this.
Owner
!= null) ? this.
Owner
.DisplayMode : CalendarMode.Month;
140
return (
Owner
!= null) ?
Owner
.DisplayDate : DateTime.Today;
216
if (this.
Owner
!= null)
218
switch (this.
Owner
.DisplayMode)
273
this.
Owner
.DisplayMode == CalendarMode.Month &&
274
this.
Owner
.HoverEnd.HasValue)
276
FinishSelection(this.
Owner
.HoverEnd.Value);
299
if (this.
Owner
!= null)
301
selectedYear = this.
Owner
.DisplayYear;
522
if (this.
Owner
!= null)
524
this.
Owner
.CurrentDate = selectedDate;
526
if (this.
Owner
.HoverStart.HasValue)
530
DateTime.Compare(this.
Owner
.HoverStart.Value, selectedDate) == 0 &&
531
(
Owner
.SelectionMode == CalendarSelectionMode.SingleDate ||
Owner
.SelectionMode == CalendarSelectionMode.MultipleRange))
534
this.
Owner
.SelectedDates.Toggle(selectedDate);
540
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.HoverStart.Value, selectedDate);
543
Owner
.OnDayClick(selectedDate);
552
if (this.
Owner
== null)
557
this.
Owner
.OnDayOrMonthPreviewKeyDown(e);
562
if (this.
Owner
== null)
583
switch (this.
Owner
.SelectionMode)
594
this.
Owner
.SelectedDate = clickedDate;
598
this.
Owner
.SelectedDates.Toggle(clickedDate);
606
DateTime? lastDate = this.
Owner
.CurrentDate;
607
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
610
this.
Owner
.SelectedDates.AddRangeInternal(lastDate.Value, clickedDate);
614
this.
Owner
.SelectedDate = clickedDate;
615
this.
Owner
.HoverStart = null;
616
this.
Owner
.HoverEnd = null;
626
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
631
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.CurrentDate, clickedDate);
637
this.
Owner
.SelectedDate = clickedDate;
641
this.
Owner
.SelectedDates.Toggle(clickedDate);
642
this.
Owner
.HoverStart = null;
643
this.
Owner
.HoverEnd = null;
651
this.
Owner
.OnDayClick(clickedDate);
664
if (this.
Owner
== null || !(b.DataContext is DateTime))
671
this.
Owner
.HoverStart = null;
685
switch (this.
Owner
.SelectionMode)
694
this.
Owner
.DatePickerDisplayDateFlag = true;
697
this.
Owner
.SelectedDate = selectedDate;
701
this.
Owner
.SelectedDates.Toggle(selectedDate);
709
this.
Owner
.SelectedDates.ClearInternal();
713
if (!this.
Owner
.HoverStart.HasValue)
715
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
720
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
730
this.
Owner
.SelectedDates.ClearInternal();
735
if (!this.
Owner
.HoverStart.HasValue)
737
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
742
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
749
this.
Owner
.CurrentDate = selectedDate;
750
this.
Owner
.UpdateCellItems();
771
if (this.
Owner
== null || !(b.DataContext is DateTime))
778
switch (this.
Owner
.SelectionMode)
782
this.
Owner
.DatePickerDisplayDateFlag = true;
783
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = null;
784
if (this.
Owner
.SelectedDates.Count == 0)
786
this.
Owner
.SelectedDates.Add(selectedDate);
790
this.
Owner
.SelectedDates[0] = selectedDate;
797
this.
Owner
.HoverEnd = selectedDate;
798
this.
Owner
.CurrentDate = selectedDate;
799
this.
Owner
.UpdateCellItems();
812
if (this.
Owner
== null)
819
this.
Owner
.OnDayButtonMouseUp(e);
836
if (this.
Owner
.SelectionMode == CalendarSelectionMode.None || this.
Owner
.SelectionMode == CalendarSelectionMode.SingleDate)
838
this.
Owner
.OnDayClick(selectedDate);
842
if (this.
Owner
.HoverStart.HasValue)
844
switch (this.
Owner
.SelectionMode)
849
this.
Owner
.SelectedDates.ClearInternal();
868
this.
Owner
.OnDayClick(selectedDate);
881
if (this.
Owner
!= null)
883
this.
Owner
.OnCalendarButtonPressed(b, false);
891
if (b != null && this.
Owner
!= null)
893
this.
Owner
.OnCalendarButtonPressed(b, true);
902
if (this._isMonthPressed && this.
Owner
!= null)
904
this.
Owner
.OnCalendarButtonPressed(b, false);
914
this.
Owner
.OnCalendarButtonPressed(b, true);
920
if (this.
Owner
!= null)
922
if (this.
Owner
.DisplayMode == CalendarMode.Month)
924
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Year);
928
Debug.Assert(this.
Owner
.DisplayMode == CalendarMode.Year);
930
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Decade);
939
if (this.
Owner
!= null)
941
this.
Owner
.OnPreviousClick();
947
if (this.
Owner
!= null)
949
this.
Owner
.OnNextClick();
971
dayCell.Owner = this.
Owner
;
997
monthCell.Owner = this.
Owner
;
1029
if (this.
Owner
!= null)
1031
daytitle.DataContext = shortestDayNames[(childIndex + (int)this.
Owner
.FirstDayOfWeek) % shortestDayNames.Length];
1078
if (this.
Owner
!= null)
1085
if (DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateEndInternal) > 0)
1097
this.
Owner
.BlackoutDates.Contains(dateToAdd.Value));
1102
DateTimeHelper.CompareYearMonth(dateToAdd.Value, this.
Owner
.DisplayDateInternal) != 0);
1121
foreach (DateTime item in this.
Owner
.SelectedDates)
1143
var owner = this.
Owner
;
1200
if (this.
Owner
!= null)
1209
if (this.
Owner
!= null && _nextButton != null)
1223
_nextButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateEndInternal, firstDayOfNextMonth) > -1);
1230
if (this.
Owner
!= null && _previousButton != null)
1233
_previousButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateStartInternal, firstDayOfMonth) < 0);
1259
if (this.
Owner
!= null)
1261
childButton.HasSelectedDays = (
Owner
.DisplayDate.Year == year);
1263
if (year < this.
Owner
.DisplayDateStartInternal.Year || year > this.
Owner
.DisplayDateEndInternal.Year)
1303
if (this.
Owner
!= null)
1305
childButton.HasSelectedDays = (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateInternal) == 0);
1307
if (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateEndInternal) > 0)
1335
if (this.
Owner
!= null && _nextButton != null)
1337
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year != DisplayDate.Year);
1343
if (this.
Owner
!= null && _previousButton != null)
1345
_previousButton.IsEnabled = (this.
Owner
.DisplayDateStartInternal.Year != DisplayDate.Year);
1364
if (this.
Owner
!= null && _nextButton != null)
1366
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year > decadeEnd);
1372
if (this.
Owner
!= null && _previousButton != null)
1374
_previousButton.IsEnabled = (decade > this.
Owner
.DisplayDateStartInternal.Year);
1386
if (this.
Owner
!= null)
1388
i = ((day - this.
Owner
.FirstDayOfWeek + NUMBER_OF_DAYS_IN_WEEK) % NUMBER_OF_DAYS_IN_WEEK);
1413
result.Source = this.
Owner
;