A newer version of this page is available. Switch to the current version.

SchedulerViewBase.ReverseAppointmentSelection(Appointment) Method

Switches the selection status of the specified appointment.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v19.1.dll

Declaration

public void ReverseAppointmentSelection(
    Appointment apt
)

Parameters

Name Type Description
apt Appointment

An Appointment object that specifies the appointment.

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.

Use the ReverseAppointmentSelection method to switch the selection state of a specific appointment in the current View.

If the ReverseAppointmentSelection method is called for an appointment which has not been selected, then the appointment is added to the SchedulerControl.SelectedAppointments collection and appears selected in the View. As a result, both the SchedulerControl.SelectedInterval and SchedulerViewBase.SelectedInterval properties take the time interval value that corresponds to the specified appointment.

Calling the ReverseAppointmentSelection method for a selected appointment removes it from the SchedulerControl.SelectedAppointments collection and so makes it appear unselected. In this case, the selection is applied to the View in the following manner. If the specified appointment was the only selected appointment within the scheduler control, the time interval that corresponds to the specified appointment appears selected. If there was more than one appointment selected, the ReverseAppointmentSelection method is called, no time interval appears selected and only the other appointments in the SchedulerControl.SelectedAppointments collection are displayed selected within the View.

Note that a call to the ReverseAppointmentSelection method raises the SchedulerControl.SelectionChanged event.

See Also