Back to Devexpress

TimeRulerCellAppearance Class

maui-devexpress-dot-maui-dot-scheduler-19d52435.md

latest5.1 KB
Original Source

TimeRulerCellAppearance Class

The storage for the appearance settings of the Day-based View’s time ruler cell.

Namespace : DevExpress.Maui.Scheduler

Assembly : DevExpress.Maui.Scheduler.dll

NuGet Package : DevExpress.Maui.Scheduler

Declaration

csharp
public class TimeRulerCellAppearance :
    AppearanceBase

The following members return TimeRulerCellAppearance objects:

Remarks

The DayView, WorkWeekView and WeekView use this class to store time ruler cells’ settings. The style configures the following cell types:

  1. TimeScaleInterval defines scale intervals into which the time ruler splits its time interval (the whole day or WorkTime only). Slots divide intervals into cells (2, 3). The TimeScaleSlotCount property specifies the number of slots within a scale interval.
  2. Interval Time Ruler Cell - a cell that corresponds to the first slot in a scale interval.
  3. Slot Time Ruler Cell - all other cells.

The View provides the following options that configure the cell’s appearance:

Example

This example uses the time ruler cell style and its customizer to modify the cell’s appearance.

xml
<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>
csharp
class TimeRulerCellCustomizer : ITimeRulerCellCustomizer {
    public void Customize(TimeRulerCellViewModel timeRulerCell) {
        if (timeRulerCell.IsTimeDesignatorBoundary) {
            timeRulerCell.TextFormat = "{0:hh:mm tt}";
            timeRulerCell.BackgroundColor = Colors.Orange;
        } 
    }
}

|

Symbol

|

Description

| | --- | --- | |

DayViewBase.TimeRulerCellAppearance

|

Gets or sets appearance settings of time ruler cells. This is a bindable property.

| |

TimeRulerCellAppearance

|

The storage for the appearance settings of the Day-based View’s time ruler cell.

| |

TimeRulerCellAppearance.Customizer

|

Gets or sets an object that manages an individual cell’s appearance settings. This is a bindable property.

| |

ITimeRulerCellCustomizer

|

If implemented by a class, modifies appearance settings of individual time ruler cell.

| |

ITimeRulerCellCustomizer.Customize(TimeRulerCellViewModel)

|

Modifies appearance settings of an individual time ruler cell.

| |

TimeRulerCellViewModel

|

The storage for appearance settings values of an individual time ruler cell.

|

Implements

INotifyPropertyChanged

IElementController

Inheritance

System.Object BindableObject Element AppearanceBase TimeRulerCellAppearance

Extension Methods

Yield<TimeRulerCellAppearance>()

YieldIfNotNull<TimeRulerCellAppearance>()

See Also

TimeRulerCellAppearance Members

DevExpress.Maui.Scheduler Namespace