New to Telerik UI for WPFStart a free 30-day trial

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

Definition

Constructors

C#
public ScheduleViewDragDropBehavior()

Properties

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

C#
public bool CacheConvertedDragData { get; set; }
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.

Gets or sets the Cursor that will be used during the resize operation.

C#
public Cursor ResizeCursor { get; set; }
Remarks:

The default value of the property is null.

Methods

Begins the edit operation of the appointment.

C#
protected bool BeginEdit(DragDropState state, IOccurrence appointment)
Parameters:stateDragDropState

The state.

appointmentIOccurrence

The appointment.

Returns:

bool

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

C#
public override bool CanDrop(DragDropState state)
Parameters:stateDragDropState

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.

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

C#
public virtual bool CanResize(DragDropState state)
Parameters:stateDragDropState

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.

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

C#
public override bool CanStartDrag(DragDropState state)
Parameters:stateDragDropState

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.

Gets the value specifying whether the resize operation can be performed, or not.

C#
public virtual bool CanStartResize(DragDropState state)
Parameters:stateDragDropState

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.

Initializes the drag operation. This method could be used to filter the selected appointments.

C#
public override IEnumerable<IOccurrence> CoerceDraggedItems(DragDropState state)
Parameters:stateDragDropState

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.

This method converts the dragged data to collection of IOccurrences.

C#
public override IEnumerable<IOccurrence> ConvertDraggedData(object data)
Parameters:dataobject

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.

Copies the slot properties to appointment.

C#
protected static void CopySlotSettingsToAppointment(IAppointment appointment, Slot slot, DragDropState state)
Parameters:appointmentIAppointment

The appointment.

slotSlot

The slot.

stateDragDropState

The state.

This method is called when the drag operation is canceled.

C#
public override void DragDropCanceled(DragDropState state)
Parameters:stateDragDropState

The drag drop state.

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

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

C#
public override void DragDropCompleted(DragDropState state)
Parameters:stateDragDropState

The drag drop state.

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

Performs the drag operation.

C#
public override void Drop(DragDropState state)
Parameters:stateDragDropState

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.

Gets the edited appointment.

C#
protected IAppointment GetEditedAppointment(DragDropState state)
Parameters:stateDragDropStateReturns:

IAppointment

Gets the edited occurrence.

C#
protected Occurrence GetEditedOccurrence(DragDropState state)
Parameters:stateDragDropStateReturns:

Occurrence

Performs the resize operation.

C#
public virtual void Resize(DragDropState state)
Parameters:stateDragDropState

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.

This method is called when the resize operation is canceled.

C#
public virtual void ResizeCanceled(DragDropState state)
Parameters:stateDragDropState

The state.

Shows the recurrence choice dialog window.

C#
protected void ShowRecurrenceChoiceDialogWindow(DragDropState state, Occurrence occurrence, RecurrenceChoiceDialogMode recurrenceChoiceDialogMode, Slot slot)
Parameters:stateDragDropState

The state.

occurrenceOccurrence

The occurrence.

recurrenceChoiceDialogModeRecurrenceChoiceDialogMode

The recurrence choice dialog mode.

slotSlot

The slot.

Tries to commit the edit operation.If fails the edit operation will be canceled.

C#
protected void TryCommitEdit(DragDropState state)
Parameters:stateDragDropState

The state.