Represents a DataTemplateSelector that selects the appropriate duration template for agenda appointments based on their start and end dates relative to the displayed date.
Definition
Namespace:Telerik.Maui.Controls.Scheduler
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class AgendaAppointmentDurationTemplateSelector : DataTemplateSelector
Inheritance: objectAgendaAppointmentDurationTemplateSelector
Constructors
public AgendaAppointmentDurationTemplateSelector()
Properties
AllDayDurationTemplate
DataTemplate
Gets or sets the DataTemplate used for all-day appointments or appointments that span across multiple days.
public DataTemplate AllDayDurationTemplate { get; set; }
EndOnlyDurationTemplate
DataTemplate
Gets or sets the DataTemplate used for appointments that end on the displayed date but started on a previous date.
public DataTemplate EndOnlyDurationTemplate { get; set; }
StartEndDurationTemplate
DataTemplate
Gets or sets the DataTemplate used for appointments that both start and end on the displayed date.
public DataTemplate StartEndDurationTemplate { get; set; }
StartOnlyDurationTemplate
DataTemplate
Gets or sets the DataTemplate used for appointments that start on the displayed date but end on a different date.
public DataTemplate StartOnlyDurationTemplate { get; set; }
Methods
OnSelectTemplate(object, BindableObject)
DataTemplate
Selects the appropriate duration template based on the appointment's start and end dates.
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
The item to select a template for. Expected to be an AgendaAppointmentNode.
containerBindableObjectThe bindable object containing the item.
Returns:DataTemplate
The selected DataTemplate based on the following logic:
- AllDayDurationTemplate if the appointment is all-day or spans multiple days.
- StartEndDurationTemplate if the appointment starts and ends on the displayed date.
- StartOnlyDurationTemplate if the appointment starts on the displayed date.
- EndOnlyDurationTemplate if the appointment ends on the displayed date.
nullif the item is not an AgendaAppointmentNode or no template matches.