Back to Devexpress

TimelineView.Scales Property

windowsforms-devexpress-dot-xtrascheduler-dot-timelineview-766b316f.md

latest4.9 KB
Original Source

TimelineView.Scales Property

Provides access to a collection of time scales displayed in the Timeline view.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true)]
public TimeScaleCollection Scales { get; }
vb
<XtraSerializableProperty(XtraSerializationVisibility.Collection, True, False, True)>
Public ReadOnly Property Scales As TimeScaleCollection

Property Value

TypeDescription
TimeScaleCollection

A TimeScaleCollection object containing time scales for this view.

|

Remarks

Use this property to access the time scales 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.

You can implement your own custom time scales, and add them to the TimelineView.Scales collection. This approach can be helpful if you wish to hide specific time intervals in the Timeline view. For more information, review the How to: Hide Certain Columns in the Timeline View article.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Scales 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.

winforms-scheduler-hide-weekends-timeline-view/CS/HideWeekends/Form1.cs#L41

csharp
private void HideWeekends(bool hide) {
    TimeScaleCollection scales = schedulerControl1.TimelineView.Scales;
    if(hide) {

winforms-scheduler-custom-scales-in-timeline-view/CS/HideWeekends/Form1.cs#L32

csharp
{
    var scales = schedulerControl1.TimelineView.Scales;
    try

winforms-scheduler-hide-weekends-timeline-view/VB/HideWeekends/Form1.vb#L42

vb
Private Sub HideWeekends(ByVal hide As Boolean)
    Dim scales As TimeScaleCollection = schedulerControl1.TimelineView.Scales
    If hide Then

winforms-scheduler-custom-scales-in-timeline-view/VB/HideWeekends/Form1.vb#L30

vb
Private Sub HideWeekends(ByVal hide As Boolean)
    Dim scales = schedulerControl1.TimelineView.Scales
    Try

See Also

How to: Merge Columns to Hide Specific Time Intervals in the Timeline View

TimelineView Class

TimelineView Members

DevExpress.XtraScheduler Namespace