Skip to main content

SchedulerAppointmentFormInfo Class

Stores information about the appointment edit form.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public class SchedulerAppointmentFormInfo :
    INotifyPropertyChanged

The following members return SchedulerAppointmentFormInfo objects:

Remarks

The appointment edit form appears when you create or edit an appointment.

You can use the AppointmentFormLayout and AppointmentCompactFormLayout properties to create a custom appointment form. These properties accept a SchedulerAppointmentFormInfo class object as the Context parameter. You can use this parameter in the template of a custom layout item (DxSchedulerCustomFormLayoutItem) to get an appointment’s settings.

A SchedulerAppointmentFormInfo class object is also passed as the FormInfo argument to the AppointmentFormShowing event. If an appointment contains custom properties, you should implement a SchedulerAppointmentFormInfo descendant, declare the corresponding properties in the class, and then assign a custom descendant instance to the FormInfo argument.

For more information, refer to the following help topic: Custom Appointment Form.

<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage"
             ActiveViewType="SchedulerViewType.WorkWeek"
             AppointmentFormShowing="OnAppointmentFormShowing">
    @*...*@
    <AppointmentFormLayout Context="formInfo">
        @*...*@
        <DxSchedulerCustomFormLayoutItem ColSpanMd="12">
            <Template>
                <div style="margin-left: auto; margin-top: 14px;">
                    <DxCheckBox @bind-Checked="@(((CustomAppointmentFormInfo)formInfo).IsAccepted)" 
                                Alignment="CheckBoxContentAlignment.Right">Accept</DxCheckBox>
                </div>
            </Template>
        </DxSchedulerCustomFormLayoutItem>
    </AppointmentFormLayout>

</DxScheduler>

@code {
    public class CustomAppointmentFormInfo : SchedulerAppointmentFormInfo {
        public CustomAppointmentFormInfo(DxSchedulerAppointmentItem AppointmentItem, 
                DxSchedulerDataStorage DataStorage) : base(AppointmentItem, DataStorage) { }

        public bool IsAccepted {
            get { return (bool)CustomFields["IsAccepted"]; }
            set { CustomFields["IsAccepted"] = value; }
        }
    }

    void OnAppointmentFormShowing(SchedulerAppointmentFormEventArgs args) {
        args.FormInfo = new CustomAppointmentFormInfo(args.Appointment, DataStorage);
    }
    // ...
}

Inheritance

Object
SchedulerAppointmentFormInfo
See Also