How to: Create a Custom Appointment Recurrence Form
3 minutes to read
This document describes how to create a custom appointment recurrence editing form using recurrence controls provided by DXScheduler for the Silverlight Suite and use this form instead of the default one. The default Edit Appointment form is remained unchanged in this example.
Open the scheduling Silverlight application created in Lesson 2 of the Getting Started tutorial.
Create a custom appointment recurrence editing form that allows end-users to set an appointment recurrence range. To do this, add a new Silverlight User Control (under the CustomRecurrenceForm.xaml name) to the SilverlightApplication1 project. Locate the RecurrenceRangeControl and two Button (OK and Cancel) controls on this form.
privatevoidschedulerControl1_RecurrenceFormShowing(object sender, RecurrenceFormEventArgs e) {
AppointmentForm appointmentForm = e.ParentForm as AppointmentForm;
e.Form = new CustomRecurrenceForm(appointmentForm.Controller);
}
PrivateSub schedulerControl1_RecurrenceFormShowing(sender AsObject, _
e As RecurrenceFormEventArgs)
Dim appointmentForm As AppointmentForm = TryCast(e.ParentForm, AppointmentForm)
e.Form = New CustomRecurrenceForm(appointmentForm.Controller)
EndSub
Run the project. The custom appointment recurrence editing form will be invoked when selecting New Recurring Appointment or New Recurring Event from the context menu, selecting Edit Series from the recurring appointment context menu or clicking the Recurrence button on the default appointment editing form.