Defines the basic methods of a generic FileDialogs DragDropBehavior.
Definition
Namespace:Telerik.Windows.Controls.FileDialogs.DragDrop
Assembly:Telerik.Windows.Controls.FileDialogs.dll
Type Parameters:
TState
The state type.
Syntax:
public abstract class DragDropBehavior<TState> : DependencyObject, IDragDropBehavior<TState> where TState : DragDropState
Inheritance: objectDragDropBehavior<TState>
Derived Classes:
Implements:
Constructors
protected DragDropBehavior()
Methods
Returns a value specifying whether the current drag operation can be completed.
public virtual bool CanDrop(TState state)
DragDropState that provides context for the current operation.
Returns:True if the drag operation can be completed, otherwise false.
Implements:
This method is called only in the context of the drop target control.
Returns a value specifying whether the drag operation can be started.
public virtual bool CanStartDrag(TState state)
DragDropState that provides context for the current operation.
Returns:True if the drag operation can be completed, otherwise false.
Implements:
This method is called only in the context of the drag source control.
When overridden in a derived class, filters the dragged items collection if necessary.
public IEnumerable CoerceDraggedItems(TState state)
DragDropState that provides context for the current operation.
Returns:The filtered dragged items.
Implements:
This method is called immediately before the drag operation starts. Only the Items property of the DragDropState is valid.
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.
public virtual void DragDropCanceled(TState state)
DragDropState that provides context for the current operation.
Implements:
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.
When overridden in a derived class completes the drag operation. This method is called only in the context of the drag source control.
public void DragDropCompleted(TState state)
DragDropState that provides context for the current operation.
Implements:
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.
Completes the drop operation. This method is called only in the context of the drop target control.
public virtual void Drop(TState state)
DragDropState that provides context for the current operation.
Implements:
GetDragDropEffects(TState)
DragDropEffects
Returns the DragDropEffects for the current drag drop operation. The return value affects the mouse cursor.
public virtual DragDropEffects GetDragDropEffects(TState state)
DragDropState that provides context for the current operation.
Returns:DragDropEffects
This method is called only in the context of the drop target control.