2 writes to Owner
PresentationFramework (2)
System\Windows\Controls\Calendar.cs (2)
749
_monthControl.
Owner
= null;
758
_monthControl.
Owner
= this;
134 references to Owner
PresentationFramework (134)
System\Windows\Controls\Primitives\CalendarItem.cs (134)
103
return (this.
Owner
!= null) ? this.
Owner
.DisplayMode : CalendarMode.Month;
135
return (
Owner
!= null) ?
Owner
.DisplayDate : DateTime.Today;
211
if (this.
Owner
!= null)
213
switch (this.
Owner
.DisplayMode)
268
this.
Owner
.DisplayMode == CalendarMode.Month &&
269
this.
Owner
.HoverEnd.HasValue)
271
FinishSelection(this.
Owner
.HoverEnd.Value);
294
if (this.
Owner
!= null)
296
selectedYear = this.
Owner
.DisplayYear;
517
if (this.
Owner
!= null)
519
this.
Owner
.CurrentDate = selectedDate;
521
if (this.
Owner
.HoverStart.HasValue)
525
DateTime.Compare(this.
Owner
.HoverStart.Value, selectedDate) == 0 &&
526
(
Owner
.SelectionMode == CalendarSelectionMode.SingleDate ||
Owner
.SelectionMode == CalendarSelectionMode.MultipleRange))
529
this.
Owner
.SelectedDates.Toggle(selectedDate);
535
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.HoverStart.Value, selectedDate);
538
Owner
.OnDayClick(selectedDate);
547
if (this.
Owner
== null)
552
this.
Owner
.OnDayOrMonthPreviewKeyDown(e);
557
if (this.
Owner
== null)
578
switch (this.
Owner
.SelectionMode)
589
this.
Owner
.SelectedDate = clickedDate;
593
this.
Owner
.SelectedDates.Toggle(clickedDate);
601
DateTime? lastDate = this.
Owner
.CurrentDate;
602
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
605
this.
Owner
.SelectedDates.AddRangeInternal(lastDate.Value, clickedDate);
609
this.
Owner
.SelectedDate = clickedDate;
610
this.
Owner
.HoverStart = null;
611
this.
Owner
.HoverEnd = null;
621
this.
Owner
.SelectedDates.ClearInternal(true /*fireChangeNotification*/);
626
this.
Owner
.SelectedDates.AddRangeInternal(this.
Owner
.CurrentDate, clickedDate);
632
this.
Owner
.SelectedDate = clickedDate;
636
this.
Owner
.SelectedDates.Toggle(clickedDate);
637
this.
Owner
.HoverStart = null;
638
this.
Owner
.HoverEnd = null;
646
this.
Owner
.OnDayClick(clickedDate);
659
if (this.
Owner
== null || !(b.DataContext is DateTime))
666
this.
Owner
.HoverStart = null;
680
switch (this.
Owner
.SelectionMode)
689
this.
Owner
.DatePickerDisplayDateFlag = true;
692
this.
Owner
.SelectedDate = selectedDate;
696
this.
Owner
.SelectedDates.Toggle(selectedDate);
704
this.
Owner
.SelectedDates.ClearInternal();
708
if (!this.
Owner
.HoverStart.HasValue)
710
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
715
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
725
this.
Owner
.SelectedDates.ClearInternal();
730
if (!this.
Owner
.HoverStart.HasValue)
732
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = this.
Owner
.CurrentDate;
737
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = selectedDate;
744
this.
Owner
.CurrentDate = selectedDate;
745
this.
Owner
.UpdateCellItems();
766
if (this.
Owner
== null || !(b.DataContext is DateTime))
773
switch (this.
Owner
.SelectionMode)
777
this.
Owner
.DatePickerDisplayDateFlag = true;
778
this.
Owner
.HoverStart = this.
Owner
.HoverEnd = null;
779
if (this.
Owner
.SelectedDates.Count == 0)
781
this.
Owner
.SelectedDates.Add(selectedDate);
785
this.
Owner
.SelectedDates[0] = selectedDate;
792
this.
Owner
.HoverEnd = selectedDate;
793
this.
Owner
.CurrentDate = selectedDate;
794
this.
Owner
.UpdateCellItems();
807
if (this.
Owner
== null)
814
this.
Owner
.OnDayButtonMouseUp(e);
831
if (this.
Owner
.SelectionMode == CalendarSelectionMode.None || this.
Owner
.SelectionMode == CalendarSelectionMode.SingleDate)
833
this.
Owner
.OnDayClick(selectedDate);
837
if (this.
Owner
.HoverStart.HasValue)
839
switch (this.
Owner
.SelectionMode)
844
this.
Owner
.SelectedDates.ClearInternal();
863
this.
Owner
.OnDayClick(selectedDate);
876
if (this.
Owner
!= null)
878
this.
Owner
.OnCalendarButtonPressed(b, false);
886
if (b != null && this.
Owner
!= null)
888
this.
Owner
.OnCalendarButtonPressed(b, true);
897
if (this._isMonthPressed && this.
Owner
!= null)
899
this.
Owner
.OnCalendarButtonPressed(b, false);
909
this.
Owner
.OnCalendarButtonPressed(b, true);
915
if (this.
Owner
!= null)
917
if (this.
Owner
.DisplayMode == CalendarMode.Month)
919
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Year);
923
Debug.Assert(this.
Owner
.DisplayMode == CalendarMode.Year);
925
this.
Owner
.SetCurrentValueInternal(Calendar.DisplayModeProperty, CalendarMode.Decade);
934
if (this.
Owner
!= null)
936
this.
Owner
.OnPreviousClick();
942
if (this.
Owner
!= null)
944
this.
Owner
.OnNextClick();
966
dayCell.Owner = this.
Owner
;
992
monthCell.Owner = this.
Owner
;
1024
if (this.
Owner
!= null)
1026
daytitle.DataContext = shortestDayNames[(childIndex + (int)this.
Owner
.FirstDayOfWeek) % shortestDayNames.Length];
1073
if (this.
Owner
!= null)
1080
if (DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareDays(dateToAdd.Value, this.
Owner
.DisplayDateEndInternal) > 0)
1092
this.
Owner
.BlackoutDates.Contains(dateToAdd.Value));
1097
DateTimeHelper.CompareYearMonth(dateToAdd.Value, this.
Owner
.DisplayDateInternal) != 0);
1116
foreach (DateTime item in this.
Owner
.SelectedDates)
1138
var owner = this.
Owner
;
1195
if (this.
Owner
!= null)
1204
if (this.
Owner
!= null && _nextButton != null)
1218
_nextButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateEndInternal, firstDayOfNextMonth) > -1);
1225
if (this.
Owner
!= null && _previousButton != null)
1228
_previousButton.IsEnabled = (DateTimeHelper.CompareDays(this.
Owner
.DisplayDateStartInternal, firstDayOfMonth) < 0);
1254
if (this.
Owner
!= null)
1256
childButton.HasSelectedDays = (
Owner
.DisplayDate.Year == year);
1258
if (year < this.
Owner
.DisplayDateStartInternal.Year || year > this.
Owner
.DisplayDateEndInternal.Year)
1298
if (this.
Owner
!= null)
1300
childButton.HasSelectedDays = (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateInternal) == 0);
1302
if (DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareYearMonth(day, this.
Owner
.DisplayDateEndInternal) > 0)
1330
if (this.
Owner
!= null && _nextButton != null)
1332
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year != DisplayDate.Year);
1338
if (this.
Owner
!= null && _previousButton != null)
1340
_previousButton.IsEnabled = (this.
Owner
.DisplayDateStartInternal.Year != DisplayDate.Year);
1359
if (this.
Owner
!= null && _nextButton != null)
1361
_nextButton.IsEnabled = (this.
Owner
.DisplayDateEndInternal.Year > decadeEnd);
1367
if (this.
Owner
!= null && _previousButton != null)
1369
_previousButton.IsEnabled = (decade > this.
Owner
.DisplayDateStartInternal.Year);
1381
if (this.
Owner
!= null)
1383
i = ((day - this.
Owner
.FirstDayOfWeek + NUMBER_OF_DAYS_IN_WEEK) % NUMBER_OF_DAYS_IN_WEEK);
1408
result.Source = this.
Owner
;