DxSchedulerTimelineView.Duration Property
Specifies the time interval displayed in the Timeline view.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public TimeSpan Duration { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan | Specifies the time interval displayed in the Timeline view. |
Remarks
The default time interval is 24 hours.
Set the Duration property to a value greater than the result of multiplying Units by UnitCount (Units*UnitCount). Otherwise, an appointment’s duration may be displayed incorrectly.
- Index.razor
- Resource.cs
- ResourceAppointment.cs
- ResourceAppointmentCollection.cs
- ResourceCollection.cs
@using Data
<DxScheduler StartDate="@(DateTime.Today + TimeSpan.FromHours(8))"
DataStorage="@DataStorage"
ResourceNavigatorVisible="false">
<DxSchedulerTimelineView Duration="@(TimeSpan.FromHours(36))" CellMinWidth="100">
<Scales>
<DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Day" UnitCount="1"></DxSchedulerTimeScale>
<DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Hour" UnitCount="6"></DxSchedulerTimeScale>
</Scales>
</DxSchedulerTimelineView>
</DxScheduler>
@code {
DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
AppointmentsSource = ResourceAppointmentCollection.GetAppointments(),
AppointmentMappings = new DxSchedulerAppointmentMappings() {
Id = "Id",
Type = "AppointmentType",
Start = "StartDate",
End = "EndDate",
Subject = "Caption",
AllDay = "AllDay",
Location = "Location",
Description = "Description",
LabelId = "Label",
StatusId = "Status",
RecurrenceInfo = "Recurrence",
ResourceId = "ResourceId"
},
ResourcesSource = ResourceAppointmentCollection.GetResourcesForGrouping(),
ResourceMappings = new DxSchedulerResourceMappings() {
Id = "Id",
Caption = "Name",
BackgroundCssClass = "BackgroundCss",
TextCssClass = "TextCss"
}
};
}
See Also