public override void OnApplyTemplate() { base.OnApplyTemplate(); _calendarX = Template?.FindName("PART_CalendarX", this) as CalendarX; _calendarX.SelectedDateChanged += CalendarX_SelectedDateChanged; _timeSelector = Template?.FindName("PART_TimeSelector", this) as TimeSelector; _timeSelector.SelectedTimeChanged += TimeSelector_SelectedTimeChanged; _clearButton = Template?.FindName("PART_ClearButton", this) as Button; _clearButton.Click += ClearButton_Click; LimitCalendarXDate(); LimitTimeSelectorTime(); }
public SelectedDatesCollection(CalendarX calendarX) { _calendarX = calendarX; }