SchedulerViewBase.GetAppointments() Method
Gets the collection of appointments displayed in the current view.
Namespace: DevExpress.Xpf.Scheduler
Assembly: DevExpress.Xpf.Scheduler.v24.1.dll
NuGet Package: DevExpress.Wpf.Scheduler
Declaration
Returns
Type | Description |
---|---|
AppointmentBaseCollection | A AppointmentBaseCollection object, representing a collection of appointments. |
Remarks
Important
You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.
If the current view does not contain appointments, this method returns a new collection which does not contain elements.
Example
This example demonstrates how to programmatically select all appointments displayed in the current view.
using DevExpress.XtraScheduler;
// ...
AppointmentBaseCollection aptColl = schedulerControl1.ActiveView.GetAppointments();
foreach (Appointment apt in aptColl) {
schedulerControl1.ActiveView.AddAppointmentSelection(apt);
}