Back to Devexpress

SchedulerControl.AppointmentResizing Event

windowsforms-devexpress-dot-xtrascheduler-dot-schedulercontrol-947d525d.md

latest5.5 KB
Original Source

SchedulerControl.AppointmentResizing Event

Occurs when the user starts modifying the appointment’s interval by dragging its border with the mouse.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public event AppointmentResizeEventHandler AppointmentResizing
vb
Public Event AppointmentResizing As AppointmentResizeEventHandler

Event Data

The AppointmentResizing event's data class is AppointmentResizeEventArgs. The following properties provide information specific to this event:

PropertyDescription
AllowSpecifies whether the appointment can be resized.
EditedAppointmentGets the appointment being edited in the resize event.
HandledGets or sets whether the resize operation is handled, and therefore no default processing is required.
HitIntervalGets the time interval represented by the time cell to which the appointment’s side is moved.
HitResourceGets the resource assigned to cells to which an appointment’s side is moved.
ResizedSideIndicates which appointment side is being moved when the appointment is resized.
SourceAppointmentGets the source appointment in the resize event.

Remarks

The event arguments provide information on an appointment before and after resizing, the resource and time interval associated with time cells to which the appointment’s edge is moving, and also indicate which side of the appointment is moved.

By setting the AppointmentResizeEventArgs.Allow property value to false and the AppointmentResizeEventArgs.Handled property - to true , you can cancel resizing.

The AppointmentResizing event determines the values of the Allow and Handled parameters passed to the SchedulerControl.AppointmentResized event which follows the AppointmentResizing event, as described in the table below.

AppointmentResizing EventAppointmentResized EventEffect
Set AppointmentResizeEventArgs.Allow = false , AppointmentResizeEventArgs.Handled = true.When the event occurs, its handler receives the AppointmentResizeEventArgs.Allow equals to false , the AppointmentResizeEventArgs.Handled equals to true.Resize action is canceled.
Set the AppointmentResizeEventArgs.Handled = false.When the event occurs, its handler receives the AppointmentResizeEventArgs.Allow and the AppointmentResizeEventArgs.Handled property values which are not determined by the AppointmentResizing event handler.Depends on the AppointmentResized event handler.

Therefore, if you want to cancel resizing, you can handle the AppointmentResizing event only.

The SchedulerOptionsCustomization.AllowAppointmentResize value takes priority over the AppointmentResizing. If it is set to AppointmentConflictsMode.Custom, then the SchedulerControl.AllowAppointmentResize event occurs before the AppointmentResizing event. Dragging the appointments border with the mouse results in a series of AppointmentResizing events, followed by a single SchedulerControl.AppointmentResized event.

See Also

AppointmentResized

SchedulerControl Class

SchedulerControl Members

DevExpress.XtraScheduler Namespace