Back to Devexpress

TimelineView.TimeScales Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-timelineview-4ec746cb.md

latest2.8 KB
Original Source

TimelineView.TimeScales Property

Gets or sets the time intervals displayed in the Timeline view.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public TimeScaleCollection TimeScales { get; set; }
vb
Public Property TimeScales As TimeScaleCollection

Property Value

TypeDescription
TimeScaleCollection

A TimeSpanCollection object that is a collection of time intervals.

|

Remarks

If you define multiple time scales, the scheduler displays the time scale that has the shortest duration of a single division:

Duration = ScaleUnit * UnitCount

Use the MinWidth property to specify the minimum allowed width of a single division. A time scale can only be shown if the Zoom value is small enough to accommodate the duration of at least a single division:

MinWidth < Duration / Zoom

The code snippet below illustrates how to define two time scales:

xaml
<dxsch:TimelineView>
    <dxsch:TimelineView.TimeScales>
        <!--duration of a single scale division is 1 hour-->
        <dxsch:TimeScale ScaleUnit="Hour" UnitCount="1" MinWidth="0"/>
        <!--duration of a single scale division is 3 minutes-->
        <dxsch:TimeScale ScaleUnit="Minute" UnitCount="30" MinWidth="60"/>
    </dxsch:TimelineView.TimeScales>
</dxsch:TimelineView>

The following image shows the result:

The TimeScaleMaxCount property specifies the maximum number of time scales displayed by the Scheduler. The image below illustrates the Timeline View with three time scales.

See Also

TimelineView Class

TimelineView Members

DevExpress.Xpf.Scheduling Namespace