RecurrenceRangeControl Class
A control used to specify an end condition for the series of recurring appointments.
Namespace: DevExpress.Xpf.Scheduler.UI
Assembly: DevExpress.Xpf.Scheduler.v14.2.dll
#Declaration
[DXToolboxBrowsable]
[ToolboxTabName("DX.14.2: Scheduling")]
public class RecurrenceRangeControl :
UserControl,
INotifyPropertyChanged,
IComponentConnector
#Remarks
Use the RecurrenceRangeControl.RecurrenceInfo and RecurrenceRangeControl.Pattern properties to bind the RecurrenceRangeControl control to the recurrence range setting of the pattern appointment.
Refer to How to: Create a Custom Appointment Recurrence Form for an example on how to use the RecurrenceRangeControl control on a custom appointment recurrence editing form.
#Examples
This example demonstrates how to use the RecurrenceRangeControl control on a custom Edit Appointment form to modify the recurrence range of the pattern appointment. To bind the RecurrenceRangeControl control to the recurrence range settings via the RecurrenceVisualController and AppointmentFormController controllers, use the RecurrenceRangeControl.RecurrenceInfo and RecurrenceRangeControl.Pattern properties.
For an example with step-by-step instructions on how to replace a standard Edit Appointment form with a custom one, refer to the Lesson 3 - Create a Custom Edit Appointment Form with Custom Fields document.
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; } }
public TimeZoneHelper TimeZoneHelper { get { return Controller.TimeZoneHelper; } }
public bool ShouldShowRecurrence { get { return Appointment.Type == AppointmentType.Pattern
&& Controller.ShouldShowRecurrenceButton; } }
private void Ok_button_Click(object sender, RoutedEventArgs e) {
if (ShouldShowRecurrence)
RecurrenceVisualController.ApplyRecurrence();
Controller.ApplyChanges();
SchedulerFormBehavior.Close(this, true);
}
}
}
public class CustomAppointmentFormController : AppointmentFormController {
public CustomAppointmentFormController(SchedulerControl control, Appointment apt)
: base(control, apt) {
}
}