TimelineView.Scales Property
Provides access to a collection of time scales displayed in the Timeline View.
Namespace: DevExpress.Xpf.Scheduler
Assembly: DevExpress.Xpf.Scheduler.v14.2.dll
#Declaration
#Property Value
Type | Description |
---|---|
Time |
A Time |
#Remarks
Use the Scales property to access the time scale collection, and specify the TimeScale elements of the current view. The available time scales are used in the visible time interval calculations, and you may control whether a particular time scale should be considered via the TimeScale.Enabled property. The display options can be customized via the TimeScale.DisplayFormat and TimeScale.Width properties. You may hide a specific time scale by setting the TimeScale.Visible property
to false.
The most detailed time scale that is enabled and displayed visually as a basis for the scales is returned by the TimelineView.GetBaseTimeScale method.
#Examples
This example illustrates how to access the time scale collection of the Timeline View (via the TimelineView.Scales property) and add TimeScale elements to be available for end-users (for example, TimeScaleMonth, TimeScaleWeek and TimeScaleDay). This approach can be helpful if you wish to hide specific time intervals in the Timeline View.
To change the format of a single scale header, adjust the TimeScale.DisplayFormat property of the corresponding TimeScale object.
You can also implement your own custom time scales and add them to the TimelineView.Scales collection. This example demonstrates the comparatively simple task of creating a scale with a fixed interval (four hours) by inheriting from the TimeScaleFixedInterval class. For more complex tasks, use the TimeScale descendants and override key methods.