DxScheduler.ActiveViewType Property
Specifies the currently active view.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
[DefaultValue(SchedulerViewType.Default)]
[Parameter]
public SchedulerViewType ActiveViewType { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Scheduler |
Default | An enumeration value. |
Available values:
Name | Description |
---|---|
Default | The component displays the first view specified in the Views markup. |
Day | Specifies the Dx |
Work |
Specifies the Dx |
Week | Specifies the Dx |
Month | Specifies the Dx |
Timeline | Specifies the Dx |
#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>
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;
}