SchedulerControl.ActiveViewType Property

Gets or sets the type of the View which is currently used by the SchedulerControl to show its data.

Namespace: DevExpress.Xpf.Scheduler

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

Declaration

[DefaultValue(SchedulerViewType.Day)]
public SchedulerViewType ActiveViewType { get; set; }
<DefaultValue(SchedulerViewType.Day)>
Public Property ActiveViewType As SchedulerViewType

Property Value

Type Default Description
SchedulerViewType

Day

A SchedulerViewType enumeration value specifying the active View type.

Remarks

IMPORTANT

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.

To access the current View of the scheduler, use the SchedulerControl.ActiveView property.

Examples

This example demonstrates how to provide end-users with the capability to change the type of View that is currently active in the Scheduler control.

The code below illustrates how to use the RadioButtonList control for this. This control should be bound to a ArrayList object, which contains items equivalent to the SchedulerViewType enumeration values. Then, it is necessary to bind the RadioButtonList.SelectedValue property value to the SchedulerControl.ActiveViewType property of the Scheduler control.

<GroupBox Header="View Types" Grid.Column="0">
    <dx:RadioButtonList x:Name="viewType" Margin="4" 
        HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
        Background="{x:Null}" 
        SelectedValue="{Binding ElementName=schedulerControl1, Path=ActiveViewType, Mode=TwoWay}">
        <dx:RadioButtonList.ItemsSource>
            <collections:ArrayList>
                <dxschcore:SchedulerViewType>Day</dxschcore:SchedulerViewType>
                    <dxschcore:SchedulerViewType>FullWeek</dxschcore:SchedulerViewType>
                    <dxschcore:SchedulerViewType>Week</dxschcore:SchedulerViewType>
                <dxschcore:SchedulerViewType>WorkWeek</dxschcore:SchedulerViewType>
                <dxschcore:SchedulerViewType>Month</dxschcore:SchedulerViewType>
                <dxschcore:SchedulerViewType>Timeline</dxschcore:SchedulerViewType>
            </collections:ArrayList>
        </dx:RadioButtonList.ItemsSource>
    </dx:RadioButtonList>
</GroupBox>
See Also