Class
ScheduleViewDragDropBehavior

Provides the default drag-drop and resize implementation of the RadScheduleView control.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ScheduleView.dll

Syntax:

cs-api-definition
public class ScheduleViewDragDropBehavior : DragDropBehavior<DragDropState, IOccurrence>

Inheritance: objectDragDropBehavior<DragDropState, IOccurrence>ScheduleViewDragDropBehavior

Inherited Members DragDropBehavior<DragDropState, IOccurrence>.CanStartDrag(DragDropState)DragDropBehavior<DragDropState, IOccurrence>.CanDrop(DragDropState)DragDropBehavior<DragDropState, IOccurrence>.Drop(DragDropState)DragDropBehavior<DragDropState, IOccurrence>.DragDropCanceled(DragDropState)DragDropBehavior<DragDropState, IOccurrence>.DragDropCompleted(DragDropState)DragDropBehavior<DragDropState, IOccurrence>.CoerceDraggedItems(DragDropState)DragDropBehavior<DragDropState, IOccurrence>.ConvertDraggedData(object)

Constructors

ScheduleViewDragDropBehavior()

Declaration

cs-api-definition
public ScheduleViewDragDropBehavior()

Properties

CacheConvertedDragData

Gets or sets value that indicates whether to cache the converted drag data.

Declaration

cs-api-definition
public bool CacheConvertedDragData { get; set; }

Property Value

bool

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 Cursor that will be used during the resize operation.

Declaration

cs-api-definition
public Cursor ResizeCursor { get; set; }

Property Value

Cursor

Remarks

The default value of the property is null.

Methods

BeginEdit(DragDropState, IOccurrence)

Begins the edit operation of the appointment.

Declaration

cs-api-definition
protected bool BeginEdit(DragDropState state, IOccurrence appointment)

Parameters

state

DragDropState

The state.

appointment

IOccurrence

The appointment.

Returns

bool

CanDrop(DragDropState)

Gets the value specifying whether the drag operation can be finished, or not.

Declaration

cs-api-definition
public override bool CanDrop(DragDropState state)

Parameters

state

DragDropState

DragDropState identifying the current drag operation.

Returns

bool

True when the drag operation can be finished, otherwise false.

Overrides DragDropBehavior<DragDropState, IOccurrence>.CanDrop(DragDropState)

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

cs-api-definition
public virtual bool CanResize(DragDropState state)

Parameters

state

DragDropState

DragDropState identifying the current resize operation.

Returns

bool

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

cs-api-definition
public override bool CanStartDrag(DragDropState state)

Parameters

state

DragDropState

DragDropState identifying the current drag operation.

Returns

bool

True when the drag operation can be performed, otherwise false.

Overrides DragDropBehavior<DragDropState, IOccurrence>.CanStartDrag(DragDropState)

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

cs-api-definition
public virtual bool CanStartResize(DragDropState state)

Parameters

state

DragDropState

DragDropState identifying the current resize operation.

Returns

bool

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

cs-api-definition
public override IEnumerable<IOccurrence> CoerceDraggedItems(DragDropState state)

Parameters

state

DragDropState

DragDropState identifying the current drag operation.

Returns

IEnumerable<IOccurrence>

The appointments that are allowed for dragging.

Overrides DragDropBehavior<DragDropState, IOccurrence>.CoerceDraggedItems(DragDropState)

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

cs-api-definition
public override IEnumerable<IOccurrence> ConvertDraggedData(object data)

Parameters

data

object

The data.

Returns

IEnumerable<IOccurrence>

Overrides DragDropBehavior<DragDropState, IOccurrence>.ConvertDraggedData(object)

Remarks

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.

CopySlotSettingsToAppointment(IAppointment, Slot, DragDropState)

Copies the slot properties to appointment.

Declaration

cs-api-definition
protected static void CopySlotSettingsToAppointment(IAppointment appointment, Slot slot, DragDropState state)

Parameters

appointment

IAppointment

The appointment.

slot

Slot

The slot.

state

DragDropState

The state.

DragDropCanceled(DragDropState)

This method is called when the drag operation is canceled.

Declaration

cs-api-definition
public override void DragDropCanceled(DragDropState state)

Parameters

state

DragDropState

The drag drop state.

Overrides DragDropBehavior<DragDropState, IOccurrence>.DragDropCanceled(DragDropState)

DragDropCompleted(DragDropState)

This method is called when the drag and drop operations are completed.

Declaration

cs-api-definition
public override void DragDropCompleted(DragDropState state)

Parameters

state

DragDropState

The drag drop state.

Overrides DragDropBehavior<DragDropState, IOccurrence>.DragDropCompleted(DragDropState)

Drop(DragDropState)

Performs the drag operation.

Declaration

cs-api-definition
public override void Drop(DragDropState state)

Parameters

state

DragDropState

DragDropState identifying the current drag operation.

Overrides DragDropBehavior<DragDropState, IOccurrence>.Drop(DragDropState)

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

cs-api-definition
protected IAppointment GetEditedAppointment(DragDropState state)

Parameters

state

DragDropState

Returns

IAppointment

GetEditedOccurrence(DragDropState)

Gets the edited occurrence.

Declaration

cs-api-definition
protected Occurrence GetEditedOccurrence(DragDropState state)

Parameters

state

DragDropState

Returns

Occurrence

Resize(DragDropState)

Performs the resize operation.

Declaration

cs-api-definition
public virtual void Resize(DragDropState state)

Parameters

state

DragDropState

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

cs-api-definition
public virtual void ResizeCanceled(DragDropState state)

Parameters

state

DragDropState

The state.

ShowRecurrenceChoiceDialogWindow(DragDropState, Occurrence, RecurrenceChoiceDialogMode, Slot)

Shows the recurrence choice dialog window.

Declaration

cs-api-definition
protected void ShowRecurrenceChoiceDialogWindow(DragDropState state, Occurrence occurrence, RecurrenceChoiceDialogMode recurrenceChoiceDialogMode, Slot slot)

Parameters

state

DragDropState

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

cs-api-definition
protected void TryCommitEdit(DragDropState state)

Parameters

state

DragDropState

The state.