Skip to main content

RecurrenceRangeControl.RecurrenceInfo Property

Gets or sets an object containing information about the appointment recurrence.

Namespace: DevExpress.Xpf.Scheduler.UI

Assembly: DevExpress.Xpf.Scheduler.v14.2.dll

#Declaration

public RecurrenceInfo RecurrenceInfo { get; set; }

#Property Value

Type Description
RecurrenceInfo

A RecurrenceInfo object.

#Remarks

Use the RecurrenceInfo property to specify all parameters of the appointment recurrence range.

#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) {
    }
}
See Also