TimelineView.TimeScales Property
Gets or sets the time intervals displayed in the Timeline view.
Namespace: DevExpress.Xpf.Scheduling
Assembly: DevExpress.Xpf.Scheduling.v20.2.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Scheduling, DevExpress.Wpf.Scheduling
Declaration
Property Value
Type | Description |
---|---|
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:
The code snippet below illustrates how to define two time scales:
<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.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TimeScales property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.