Provides the default drag-drop and resize implementation of the RadScheduleView control.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.ScheduleView.dll
Syntax:
public class ScheduleViewDragDropBehavior : DragDropBehavior<DragDropState, IOccurrence>
Inheritance: objectDragDropBehavior<DragDropState, IOccurrence>ScheduleViewDragDropBehavior
Inherited Members
Constructors
public ScheduleViewDragDropBehavior()
Properties
Gets or sets value that indicates whether to cache the converted drag data.
public bool CacheConvertedDragData { get; set; }
The default value of the property is false - ConvertDraggedData method will be called constantly during the drag operation. If set to true - ConvertDraggedData method will be called only once initially.
ResizeCursor
Cursor
Gets or sets the Cursor that will be used during the resize operation.
public Cursor ResizeCursor { get; set; }
The default value of the property is null.
Methods
Begins the edit operation of the appointment.
protected bool BeginEdit(DragDropState state, IOccurrence appointment)
The state.
appointmentIOccurrenceThe appointment.
Returns:Gets the value specifying whether the drag operation can be finished, or not.
public override bool CanDrop(DragDropState state)
DragDropState identifying the current drag operation.
Returns:True when the drag operation can be finished, otherwise false.
Overrides:
This method is called on every mouse move. All properties in the DragDropState are valid.
Gets the value specifying whether the resize operation can be finished, or not.
public virtual bool CanResize(DragDropState state)
DragDropState identifying the current resize operation.
Returns:True when the resize operation can be finished, otherwise false.
This method is called on every mouse move. All properties in the DragDropState, except DraggedAppointments are valid.
Gets the value specifying whether the drag operation can be performed, or not.
public override bool CanStartDrag(DragDropState state)
DragDropState identifying the current drag operation.
Returns:True when the drag operation can be performed, otherwise false.
Overrides:
This is the second method called in a drag operation, right after ValidateDrag(). Only AppointmentsSource, Appointment and DraggedAppointments properties in the DragDropState are valid.
Gets the value specifying whether the resize operation can be performed, or not.
public virtual bool CanStartResize(DragDropState state)
DragDropState identifying the current resize operation.
Returns:True when the drag operation can be performed, otherwise false.
This is the first method called in a resize operation. Only AppointmentsSource and Appointment properties in the DragDropState are valid.
Initializes the drag operation. This method could be used to filter the selected appointments.
public override IEnumerable<IOccurrence> CoerceDraggedItems(DragDropState state)
DragDropState identifying the current drag operation.
Returns:The appointments that are allowed for dragging.
Overrides:
This is the first method called in a drag operation. Only AppointmentsSource, Appointment and DraggedAppointments properties in the DragDropState are valid.
This method converts the dragged data to collection of IOccurrences.
public override IEnumerable<IOccurrence> ConvertDraggedData(object data)
The data.
Returns:Overrides:
This method is called constantly during the drag operation. If the Telerik.Windows.Controls.CacheConvertedDragData property is set to true, the method is called only once initially.
Copies the slot properties to appointment.
protected static void CopySlotSettingsToAppointment(IAppointment appointment, Slot slot, DragDropState state)
The appointment.
slotSlotThe slot.
stateDragDropStateThe state.
This method is called when the drag operation is canceled.
public override void DragDropCanceled(DragDropState state)
The drag drop state.
Overrides:
This method is called when the drag and drop operations are completed.
public override void DragDropCompleted(DragDropState state)
The drag drop state.
Overrides:
Performs the drag operation.
public override void Drop(DragDropState state)
DragDropState identifying the current drag operation.
Overrides:
This method is called when the user releases the mouse button. All properties in the DragDropState are valid.
Gets the edited appointment.
protected IAppointment GetEditedAppointment(DragDropState state)
Gets the edited occurrence.
protected Occurrence GetEditedOccurrence(DragDropState state)
Performs the resize operation.
public virtual void Resize(DragDropState state)
DragDropState identifying the current resize operation.
This method is called when the user releases the mouse button. All properties in the DragDropState, except DraggedAppointments are valid.
This method is called when the resize operation is canceled.
Shows the recurrence choice dialog window.
protected void ShowRecurrenceChoiceDialogWindow(DragDropState state, Occurrence occurrence, RecurrenceChoiceDialogMode recurrenceChoiceDialogMode, Slot slot)
The state.
occurrenceOccurrenceThe occurrence.
recurrenceChoiceDialogModeRecurrenceChoiceDialogModeThe recurrence choice dialog mode.
slotSlotThe slot.
Tries to commit the edit operation.If fails the edit operation will be canceled.