DXCalendar.DayCellTemplate Property
Gets or sets a data template used to render days. This is a bindable property.
Namespace: DevExpress.Maui.Editors
Assembly: DevExpress.Maui.Editors.dll
NuGet Package: DevExpress.Maui.Editors
Declaration
public DataTemplate DayCellTemplate { get; set; }
Property Value
Type | Description |
---|---|
DataTemplate | The template. |
Remarks
The CalendarCellData class specifies the binding context for the DayCellTemplate
. You can use the following properties to implement the template:
- Date - Returns the date the calendar cell displays.
- IsSelected - Returns whether the calendar cell is selected.
- IsTrailing - Returns whether the calendar displays days related to the previous and next months.
The following example configures a template that specifies calendar cell appearance:
<dxe:DXCalendar.DayCellTemplate>
<DataTemplate>
<Grid>
<Border Stroke="Red" StrokeThickness="2" IsVisible="{Binding IsSelected}" BackgroundColor="LightGray"/>
<Label Text="{Binding Path=Date.Day}" VerticalOptions="Center" HorizontalOptions="Center">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding IsTrailing}" Value="True">
<Setter Property="TextColor" Value="Orange"/>
</DataTrigger>
</Label.Triggers>
</Label>
</Grid>
</DataTemplate>
</dxe:DXCalendar.DayCellTemplate>
See Also