ClassAgendaAppointmentDurationTemplateSelector
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
AgendaAppointmentDurationTemplateSelector()
Declaration
public AgendaAppointmentDurationTemplateSelector()
Properties
AllDayDurationTemplate
Gets or sets the DataTemplate used for all-day appointments or appointments that span across multiple days.
Declaration
public DataTemplate AllDayDurationTemplate { get; set; }
Property Value
DataTemplate
EndOnlyDurationTemplate
Gets or sets the DataTemplate used for appointments that end on the displayed date but started on a previous date.
Declaration
public DataTemplate EndOnlyDurationTemplate { get; set; }
Property Value
DataTemplate
StartEndDurationTemplate
Gets or sets the DataTemplate used for appointments that both start and end on the displayed date.
Declaration
public DataTemplate StartEndDurationTemplate { get; set; }
Property Value
DataTemplate
StartOnlyDurationTemplate
Gets or sets the DataTemplate used for appointments that start on the displayed date but end on a different date.
Declaration
public DataTemplate StartOnlyDurationTemplate { get; set; }
Property Value
DataTemplate
Methods
OnSelectTemplate(object, BindableObject)
Selects the appropriate duration template based on the appointment's start and end dates.
Declaration
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
Parameters
item
The item to select a template for. Expected to be an AgendaAppointmentNode.
container
BindableObject
The 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.