Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxSchedulerMonthView.HorizontalAppointmentTemplate Property

Specifies a template for appointments displayed in the view.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public RenderFragment<DxSchedulerAppointmentView> HorizontalAppointmentTemplate { get; set; }

#Property Value

Type Description
RenderFragment<DxSchedulerAppointmentView>

The template content for a DxSchedulerAppointmentView object.

#Remarks

Use the HorizontalAppointmentTemplate property to customize appointment appearance in the Month view.

To build a template, use the HTML markup within the <HorizontalAppointmentTemplate> tag. The template’s context parameter allows you to access appointment data. This parameter returns a DxSchedulerAppointmentView object.

@using Data

<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage">
    <DxSchedulerMonthView>
        <HorizontalAppointmentTemplate>
            <div class="card @context.Label?.BackgroundCssClass">@context.Appointment.Subject <br />@context.Appointment.Start.ToShortTimeString()</div>
        </HorizontalAppointmentTemplate>
    </DxSchedulerMonthView>
</DxScheduler>

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentsSource = RecurringAppointmentCollection.GetAppointments(),
        AppointmentMappings = new DxSchedulerAppointmentMappings() {
            Type = "AppointmentType",
            Start = "StartDate",
            End = "EndDate",
            Subject = "Caption",
            AllDay = "AllDay",
            Location = "Location",
            Description = "Description",
            LabelId = "Label",
            StatusId = "Status",
            RecurrenceInfo = "Recurrence"
        }
    };
}

Scheduler - An appointment template for Month view

See Also