TimeRulerCellViewModel Class
The storage for appearance settings values of an individual time ruler cell.
Namespace: DevExpress.Maui.Scheduler
Assembly: DevExpress.Maui.Scheduler.dll
NuGet Package: DevExpress.Maui.Scheduler
Declaration
public class TimeRulerCellViewModel :
ItemViewModel
Remarks
The Scheduler View uses this class in the following occurrences:
BindingContext
of a data template assigned to the DayViewBase.TimeRulerCellTemplate property stores this class’s instance.- The TimeRulerCellAppearance.Customizer‘s Customize(TimeRulerCellViewModel) method accepts this class’s instance as an argument.
This view model provides the following settings that you can customize:
Example
This example uses the time ruler cell style and its customizer to modify the cell’s appearance.
<dxs:WorkWeekView.TimeRulerCellAppearance>
<dxs:TimeRulerCellAppearance
TickThickness="2"
IntervalTickLength="10"
SlotTickLength="5"
IntervalTickColor="#a0a0a0"
SlotTickColor="#d0d0d0"
BackgroundColor="#f0f0f0"
ContentPadding="8"
SlotLabelFormat="{}{0:hh:mm}"
IntervalLabelFormat="{}{0:hh:mm}"
IntervalLabelTextColor="Black"
SlotLabelTextColor="Gray">
<dxs:TimeRulerCellAppearance.Customizer>
<views:TimeRulerCellCustomizer/>
</dxs:TimeRulerCellAppearance.Customizer>
</dxs:TimeRulerCellAppearance>
</dxs:WorkWeekView.TimeRulerCellAppearance>
class TimeRulerCellCustomizer : ITimeRulerCellCustomizer {
public void Customize(TimeRulerCellViewModel timeRulerCell) {
if (timeRulerCell.IsTimeDesignatorBoundary) {
timeRulerCell.TextFormat = "{0:hh:mm tt}";
timeRulerCell.BackgroundColor = Colors.Orange;
}
}
}
Symbol | Description |
---|---|
Gets or sets appearance settings of time ruler cells. This is a bindable property. | |
The storage for the appearance settings of the Day-based View’s time ruler cell. | |
Gets or sets an object that manages an individual cell’s appearance settings. This is a bindable property. | |
If implemented by a class, modifies appearance settings of individual time ruler cell. | |
Modifies appearance settings of an individual time ruler cell. | |
| The storage for appearance settings values of an individual time ruler cell. |