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