Back to Devexpress

SchedulerControl.ActiveView Property

windowsforms-devexpress-dot-xtrascheduler-dot-schedulercontrol-cb2b1e4f.md

latest4.3 KB
Original Source

SchedulerControl.ActiveView Property

Gets the View currently used by the Scheduler to show its data.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[Browsable(false)]
public SchedulerViewBase ActiveView { get; }
vb
<Browsable(False)>
Public ReadOnly Property ActiveView As SchedulerViewBase

Property Value

TypeDescription
SchedulerViewBase

A SchedulerViewBase object which is one of the views listed in the SchedulerViewType enumeration.

|

Remarks

Note that to change the type of the currently active View the SchedulerControl.ActiveViewType property should be used. Also, handle the SchedulerControl.ActiveViewChanging and SchedulerControl.ActiveViewChanged events to perform any actions every time the active View is changing or changed.

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

how-to-implement-a-custom-inplace-editor-for-appointments-e4826/CS/SchedulerInplaceEditorExample/MyInplaceEditor.cs#L122

csharp
if (screenControlBounds.Right < rect.Right) {
    int horzOffset = control.ActiveView is DayView ? 12 : 8;
    result = new Rectangle(screenEditorBounds.Left - width - horzOffset, top, width, height);

winforms-scheduler-custom-draw-appointments/CS/CustomDrawDemo/Form1.cs#L45

csharp
TimelineView view = schedulerControl1.ActiveView as TimelineView;
view.AppointmentDisplayOptions.AllowHtmlText = true;

how-to-implement-a-custom-inplace-editor-for-appointments-e4826/VB/SchedulerInplaceEditorExample/MyInplaceEditor.vb#L120

vb
If screenControlBounds.Right < rect.Right Then
    Dim horzOffset As Integer = If(TypeOf control.ActiveView Is DayView, 12, 8)
    result = New Rectangle(screenEditorBounds.Left - width - horzOffset, top, width, height)

winforms-scheduler-custom-draw-appointments/VB/CustomDrawDemo/Form1.vb#L42

vb
Dim view As TimelineView = TryCast(schedulerControl1.ActiveView, TimelineView)
view.AppointmentDisplayOptions.AllowHtmlText = True

See Also

Views

SchedulerControl Class

SchedulerControl Members

DevExpress.XtraScheduler Namespace