Back to Devexpress

TimeRulerCellStyle.IntervalLabelTextStyle Property

mobilecontrols-devexpress-dot-xamarinforms-dot-scheduler-dot-timerulercellstyle.md

latest4.5 KB
Original Source

TimeRulerCellStyle.IntervalLabelTextStyle Property

Gets or sets text appearance settings a cell uses to generate text it displays when the cell displays a time slot that is the first slot in the time scale interval.

Namespace : DevExpress.XamarinForms.Scheduler

Assembly : DevExpress.XamarinForms.Scheduler.dll

NuGet Package : DevExpress.XamarinForms.Scheduler

Declaration

csharp
public TextStyle IntervalLabelTextStyle { get; set; }

Property Value

TypeDescription
TextStyle

The storage of text appearance settings a cell uses to generate text it displays when the cell displays a time slot that is the first slot in the time scale interval.

|

Example

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

xml
<dxs:WorkWeekView.TimeRulerCellStyle>
    <dxs:TimeRulerCellStyle 
        TickThickness="2"
        IntervalTickLength="10"
        SlotTickLength="5"
        IntervalTickColor="#a0a0a0"
        SlotTickColor="#d0d0d0"
        BackgroundColor="#f0f0f0"
        ContentPadding="8"
        SlotLabelFormat="{}{0:hh:mm}"
        IntervalLabelFormat="{}{0:hh:mm}">
        <dxs:TimeRulerCellStyle.IntervalLabelTextStyle>
            <dxs:TextStyle Color="Black"/>
        </dxs:TimeRulerCellStyle.IntervalLabelTextStyle>
        <dxs:TimeRulerCellStyle.SlotLabelTextStyle>
            <dxs:TextStyle Color="Gray"/>
        </dxs:TimeRulerCellStyle.SlotLabelTextStyle>
        <dxs:TimeRulerCellStyle.Customizer>
            <views:TimeRulerCellCustomizer/>
        </dxs:TimeRulerCellStyle.Customizer>
    </dxs:TimeRulerCellStyle>
</dxs:WorkWeekView.TimeRulerCellStyle>
csharp
class TimeRulerCellCustomizer : ITimeRulerCellCustomizer {
    public void Customize(TimeRulerCellViewModel timeRulerCell) {
        if (timeRulerCell.IsTimeDesignatorBoundary) {
            timeRulerCell.TextFormat = "{0:hh:mm tt}";
            timeRulerCell.BackgroundColor = Color.Orange;
        } 
    }
}

|

Symbol

|

Description

| | --- | --- | |

DayViewBase.TimeRulerCellStyle

|

Gets or sets appearance settings of time ruler cells.

| |

TimeRulerCellStyle

|

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

| |

TimeRulerCellStyle.Customizer

|

Gets or sets an object that manages an individual cell’s appearance settings.

| |

ITimeRulerCellCustomizer

|

The interface that should implement a class that 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‘s representation.

|

See Also

TimeRulerCellStyle Class

TimeRulerCellStyle Members

DevExpress.XamarinForms.Scheduler Namespace