SchedulerControl.RangeControlAutoAdjusting Event

Occurs before the RangeControl has been automatically adjusted when the scheduler active view or start date is changed.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v20.1.dll


public event RangeControlAdjustEventHandler RangeControlAutoAdjusting
Public Event RangeControlAutoAdjusting As RangeControlAdjustEventHandler

Event Data

The RangeControlAutoAdjusting event's data class is RangeControlAdjustEventArgs. The following properties provide information specific to this event:

Property Description
RangeMaximum Gets or sets the end bound of the range that will be available in the RangeControl after it is automatically adjusted.
RangeMinimum Gets or sets the start bound of the range that will be available in the RangeControl after it is automatically adjusted.
Scales Provides access to the collection of scales that will be visible in the RangeControl after it is automatically adjusted.



You are viewing documentation for the legacy WPF Scheduler control. If you're starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

When switching the scheduler active view, or navigating the SchedulerControl so that its SchedulerControl.Start date is beyond the bound RangeControl's available time range, you can change scales and display formats for the RangeControl by handling the RangeControlAutoAdjusting event.


The RangeControlAutoAdjusting event is fired only if the SchedulerOptionsRangeControl.AutoAdjustMode is set to true.

Use the event arguments to customize the RangeControl scales (RangeControlAdjustEventArgs.Scales) and total range boundaries (RangeControlAdjustEventArgs.RangeMinimum, RangeControlAdjustEventArgs.RangeMaximum) to be applied when adjusting the RangeControl. To review the default auto-adjust settings, see the SchedulerOptionsRangeControl.AutoAdjustMode property description.

This example demonstrates how to customize the auto-adjusting settings before they are applied to the RangeControl when an end-user switches the scheduler to the Work-Week or Month view.

  1. Set the SchedulerOptionsRangeControl.AutoAdjustMode option to true.
  2. Handle the SchedulerControl.RangeControlAutoAdjusting event. In this event handler, specify the RangeControl scales and range to be set when the Work-Week or Month view becomes active in the following way:

        xmlns:dxsch="" xmlns:dxe="" x:Class="SchedulerRangeControlExample.MainWindow"
        Title="MainWindow" Height="600" Width="800">
            <RowDefinition Height="150" />
            <RowDefinition Height="20"/>
            <RowDefinition Height="*"/>
            <dxsch:SchedulerRangeControlClient SchedulerControl="{Binding ElementName=scheduler}"/>
        <dxsch:SchedulerControl x:Name="scheduler" Grid.Row="2" VerticalAlignment="Stretch" ActiveViewType="WorkWeek" RangeControlAutoAdjusting="schedulerControl1_RangeControlAutoAdjusting" >
See Also