Class DragDropBehavior<TState>
Defines the basic methods of a generic FileDialogs DragDropBehavior.
Inheritance
Namespace: Telerik.Windows.Controls.FileDialogs.DragDrop
Assembly: Telerik.Windows.Controls.FileDialogs.dll
Syntax
public abstract class DragDropBehavior<TState> : DependencyObject, IDragDropBehavior<TState> where TState : DragDropState
Type Parameters
TState
The state type. |
Constructors
DragDropBehavior()
Declaration
protected DragDropBehavior()
Methods
CanDrop(TState)
Returns a value specifying whether the current drag operation can be completed.
Declaration
public virtual bool CanDrop(TState state)
Parameters
TState
state
DragDropState that provides context for the current operation. |
Returns
System.Boolean
True if the drag operation can be completed, otherwise false. |
Implements
Remarks
This method is called only in the context of the drop target control.
CanStartDrag(TState)
Returns a value specifying whether the drag operation can be started.
Declaration
public virtual bool CanStartDrag(TState state)
Parameters
TState
state
DragDropState that provides context for the current operation. |
Returns
System.Boolean
True if the drag operation can be completed, otherwise false. |
Implements
Remarks
This method is called only in the context of the drag source control.
CoerceDraggedItems(TState)
When overridden in a derived class, filters the dragged items collection if necessary.
Declaration
public IEnumerable CoerceDraggedItems(TState state)
Parameters
TState
state
DragDropState that provides context for the current operation. |
Returns
System.Collections.IEnumerable
The filtered dragged items. |
Implements
Remarks
This method is called immediately before the drag operation starts. Only the Items property of the DragDropState is valid.
DragDropCanceled(TState)
When overridden in a derived class cleans up a cancelled drag operation. This method is called only in the context of the drag source control.
Declaration
public virtual void DragDropCanceled(TState state)
Parameters
TState
state
DragDropState that provides context for the current operation. |
Implements
Remarks
This method is called only when the drag operation is cancelled by the user. If this method is called, the source's DragDropCompleted and target's Drop methods are not called.
DragDropCompleted(TState)
When overridden in a derived class completes the drag operation. This method is called only in the context of the drag source control.
Declaration
public void DragDropCompleted(TState state)
Parameters
TState
state
DragDropState that provides context for the current operation. |
Implements
Remarks
When the drag source and the drop target are the same control, this method is called after Drop. This method is called only when the drag operation completed successfully. If this method is called, DragDropCanceled is not called.
Drop(TState)
Completes the drop operation. This method is called only in the context of the drop target control.
Declaration
public virtual void Drop(TState state)
Parameters
TState
state
DragDropState that provides context for the current operation. |
Implements
GetDragDropEffects(TState)
Returns the DragDropEffects for the current drag drop operation. The return value affects the mouse cursor.
Declaration
public virtual DragDropEffects GetDragDropEffects(TState state)
Parameters
TState
state
DragDropState that provides context for the current operation. |
Returns
System.Windows.DragDropEffects
|
Remarks
This method is called only in the context of the drop target control.