Skip to main content

ScaleBasedRangeControlClientOptions.Scales Property

Provides access to a collection of scales displayed in the RangeControl when it is bound to a SchedulerControl.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.1.dll

NuGet Package: DevExpress.Win.Scheduler

Declaration

[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true)]
public TimeScaleCollection Scales { get; }

Property Value

Type Description
TimeScaleCollection

A TimeScaleCollection object containing scales for a RangeControl.

Remarks

When a RangeControl is bound to a SchedulerControl, scales are inherent to the RangeControl. They appear as rulers with different time scales at the top of the RangeControl and specify a timeline to be used by end-users for navigating within a SchedulerControl. Clicking a RangeControl’s scale header selects the corresponding time interval in the RangeControl and displays it in the SchedulerControl.

OptionsRangeControl_Scales

Use the Scales property to access the collection of scales and specify the TimeScale elements to be displayed within the RangeControl. When selecting scales to be enabled in the RangeControl, take into account the scheduler view and time range that contains appointments through which end-users should navigate. For example, if it is required to manipulate numerous appointments over several months, you can use the Month and Week scales. If end-users need to scroll a scheduler area in more detailed steps, you can enable the Day and Hour scales. To automatically adjust a set of visible scales depending on the scheduler active view, switch on the SchedulerOptionsRangeControl.AutoAdjustMode option.

To display a particular scale in a RangeControl, set the TimeScale.Enabled and TimeScale.Visible properties to true.

The visual appearance of scale elements can be customized via TimeScale.DisplayFormat and TimeScale.Width.

Note

If the SchedulerOptionsRangeControl.AutoAdjustMode option is enabled, the settings specified for the TimeScale items of the Scales collection will not be applied. Handle the SchedulerControl.RangeControlAutoAdjusting event to initialize a collection of scales to be displayed with the specified settings.

To apply auto-formats to header captions of RangeControl scales and leave them readable regardless of the scale element width, set the ScaleBasedRangeControlClientOptions.AutoFormatScaleCaptions property to true. When this option is switched on, the format of scale captions will be automatically adjusted after the RangeControl viewport has been resized or zoomed.

The RangeControl is divided into intervals according to the most detailed scale (a scale that has the minimum time interval among enabled scales). Each interval shows information about appointments contained within the corresponding time interval in the scheduler (appointment thumbnails or the number of appointments). Use the ScaleBasedRangeControlClientOptions.MinIntervalWidth property to specify the minimum interval width that can be set by an end-user.

You can implement your own custom scales and add them to the Scales collection.

See Also