Back to Devexpress

SchedulerControl.ActiveView Attached Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulercontrol-5d4aa9a2.md

latest3.2 KB
Original Source

SchedulerControl.ActiveView Attached Property

Returns the view currently used by the SchedulerControl to show its data.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

See GetActiveView(DependencyObject).

Returns

TypeDescription
ViewBase

A ViewBase class descendant, which represents the currently active view.

|

Remarks

Use the ActiveView property to obtain the currently active view. To change the active view type, set the SchedulerControl.ActiveViewIndex property to the index of the required view in the SchedulerControl.Views collection.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ActiveView attachedproperty.

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.

wpf-scheduler-hide-non-working-days-in-day-view/CS/NavigateCommandExample/ViewModel/MainViewModel.cs#L64

csharp
private void FixVisibleDays(bool forward, SchedulerControl scheduler) {
    DayView myView = scheduler.ActiveView as DayView;
    DateTime startDate = scheduler.Start;

wpf-scheduler-hide-non-working-days-in-day-view/VB/NavigateCommandExample/ViewModel/MainViewModel.vb#L70

vb
Private Sub FixVisibleDays(ByVal forward As Boolean, ByVal scheduler As SchedulerControl)
    Dim myView As DayView = TryCast(scheduler.ActiveView, DayView)
    Dim startDate As Date = scheduler.Start

See Also

ActiveViewIndex

ActiveViewType

SchedulerControl Class

SchedulerControl Members

DevExpress.Xpf.Scheduling Namespace