Skip to main content

DxScheduler.ActiveViewType Property

Specifies the currently active view.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

Declaration

[DefaultValue(SchedulerViewType.Default)]
[Parameter]
public SchedulerViewType ActiveViewType { get; set; }

Property Value

Type Default Description
SchedulerViewType Default

An enumeration value.

Available values:

Name Description
Default

The component displays the first view specified in the Views markup.

Day

Specifies the DxSchedulerDayView. This calendar view allows users to schedule and view appointments by day for several days.

WorkWeek

Specifies the DxSchedulerWorkWeekView. This view displays appointments for the working days in a particular week.

Week

Specifies the DxSchedulerWeekView. This view allows users to schedule and view appointments by week.

Month

Specifies the DxSchedulerMonthView. This view allows users to schedule and view appointments by month.

Timeline

Specifies the DxSchedulerTimelineView. This calendar view allows users to arrange appointments across horizontal timelines.

Remarks

If you do not specify the ActiveViewType property, a scheduler initially displays the first view specified in the Views collection:

<DxScheduler ...>
    <DxSchedulerWorkWeekView />
    <DxSchedulerWeekView />
    <DxSchedulerDayView />
    <DxSchedulerMonthView />
    <DxSchedulerTimelineView />
</DxScheduler>

Default active view

Use the ActiveViewType to specify another initial active view or change the currently used view in code. We recommend that you use two-way data binding with this property because if you change the active view in the UI, the Scheduler component reverts this change on next render.

The following code snippet sets the initial active view to Month:

<DxScheduler @bind-ActiveViewType=@ActiveViewType ...>
    <Views>
        <DxSchedulerWeekView></DxSchedulerWeekView>
        <DxSchedulerDayView></DxSchedulerDayView>
        <DxSchedulerMonthView></DxSchedulerMonthView>
    </Views>
</DxScheduler>

@code {
    SchedulerViewType ActiveViewType { get; set; } = SchedulerViewType.Month;
}
See Also