SchedulerControl.ActiveViewType Property
Gets or sets the type of the View which is currently used by the Scheduler to show its data.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.2.dll
NuGet Package: DevExpress.Win.Scheduler
#Declaration
[DefaultValue(SchedulerViewType.Day)]
[XtraSerializableProperty(XtraSerializationFlags.DefaultValue)]
public SchedulerViewType ActiveViewType { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Scheduler |
Day | A Scheduler |
Available values:
Name | Description |
---|---|
Day | Specifies the Day |
Week | Specifies the Week |
Month | Specifies the Month |
Work |
Specifies the Work |
Timeline | Specifies the Timeline |
Gantt | Specifies the Gantt |
Full |
Specifies the Full |
Agenda | Specifies the Agenda |
Year | Specifies the Year |
#Remarks
To access the current View of the scheduler use the SchedulerControl.ActiveView property.
#Example
This example demonstrates how to programmatically change the Scheduler’s view. To do this you should change the value of the SchedulerControl.ActiveViewType
property. For instance, changing this property’s value to SchedulerViewType.Week will force the scheduler to use its SchedulerControl.WeekView options.
using DevExpress.XtraScheduler;
// ...
// Switch the Scheduler to the Day View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.Day;
// Switch the Scheduler to the Work Week View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.WorkWeek;
// Switch the Scheduler to the Week View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.Week;
// Switch the Scheduler to the Month View mode.
schedulerControl1.ActiveViewType = SchedulerViewType.Month;
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ActiveViewType 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.