Back to Devexpress

DxScheduler.ActiveViewType Property

blazor-devexpress-dot-blazor-dot-dxscheduler-ef6b5ae4.md

latest3.1 KB
Original Source

DxScheduler.ActiveViewType Property

Specifies the currently active view.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDefaultDescription
SchedulerViewTypeDefault

An enumeration value.

|

Available values:

NameDescription
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:

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

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:

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

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

See Also

DxScheduler Class

DxScheduler Members

DevExpress.Blazor Namespace