MonthlyRecurrenceControl Class
A control used to set the recurrence options for monthly recurrent appointments.
Namespace: DevExpress.Xpf.Scheduler.UI
Assembly: DevExpress.Xpf.Scheduler.v14.2.dll
#Declaration
[ToolboxTabName("DX.14.2: Scheduling")]
[DXToolboxBrowsable]
public class MonthlyRecurrenceControl :
RecurrenceControlBase,
IComponentConnector
#Remarks
Use the MonthlyRecurrenceControl.RecurrenceInfo property to specify the recurrence settings.
The typical appearance of a MonthlyRecurrenceControl is shown in the picture below.
#Examples
This example demonstrates how to use the MonthlyRecurrenceControl control on a custom Edit Appointment form to modify the monthly recurrence of the pattern appointment. To bind the MonthlyRecurrenceControl control to the appointment recurrence settings via the RecurrenceVisualController controller, use the MonthlyRecurrenceControl.RecurrenceInfo property.
For an example with step-by-step instructions on how to replace a standard Edit Appointment form with a custom one, refer to Lesson 3 - Create a Custom Edit Appointment Form with Custom Fields.
using System;
using System.Windows;
using System.Windows.Controls;
using DevExpress.Xpf.Scheduler;
using DevExpress.XtraScheduler;
using DevExpress.Xpf.Scheduler.UI;
namespace SilverlightApplication1 {
public partial class CustomAppointmentForm : UserControl {
SchedulerControl control;
Appointment apt;
CustomAppointmentFormController controller;
RecurrenceVisualController recurrenceVisualController;
public CustomAppointmentForm(SchedulerControl control, Appointment apt) {
this.control = control;
this.apt = apt;
this.controller = new CustomAppointmentFormController(control, apt);
this.recurrenceVisualController = new RecurrenceVisualController(controller);
InitializeComponent();
}
public SchedulerControl Control { get { return control; } }
public Appointment Appointment { get { return apt; } }
public CustomAppointmentFormController Controller { get { return controller; } }
public RecurrenceVisualController RecurrenceVisualController
{ get { return recurrenceVisualController; } }
private void button1_Click(object sender, RoutedEventArgs e) {
RecurrenceVisualController.ApplyRecurrence();
Controller.ApplyChanges();
SchedulerFormBehavior.Close(this, true);
}
}
}
public class CustomAppointmentFormController : AppointmentFormController {
public CustomAppointmentFormController(SchedulerControl control, Appointment apt)
: base(control, apt) {
}
}