SchedulerControl.InitNewAppointment Event

Occurs before a new AppointmentItem is created in the SchedulerControl.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v21.2.dll


public event AppointmentItemEventHandler InitNewAppointment

Event Data

The InitNewAppointment event's data class is AppointmentItemEventArgs. The following properties provide information specific to this event:

Property Description
Appointment Gets the appointment for which the element is raised.


Handle the InitNewAppointment event to change the default AppointmentItem properties every time the appointment is created by an end-user.

The following code implements a special EventToCommand behavior that allows you to bind an SchedulerControl.InitNewAppointment event to a Delegate Command. The delegate command is generated automatically from a public InitNewAppointment method declared in a POCO View Model view model. Instead of passing event arguments to a method in a view model, the code specifies the NewAppointmentInitConverter converter that processes event arguments.

View Example

    <dxmvvm:EventToCommand EventName="InitNewAppointment" Command="{Binding InitNewAppointmentCommand}">

The NewAppointmentInitConverter converter changes the appointment’s label and removes the default reminder.

View Example

using DevExpress.Mvvm.UI;
using DevExpress.Xpf.Scheduling;

namespace CustomMvvmFormWithRecurrenceExample {
    public class NewAppointmentInitConverter : EventArgsConverterBase<AppointmentItemEventArgs> {
        protected override object Convert(object sender, AppointmentItemEventArgs args) {
            args.Appointment.LabelId = 1;
            return args;
See Also