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

A manager class that enables drag drop operations between objects.

Definition

Namespace:Telerik.Windows.Controls.DragDrop

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
[Obsolete("Obsoleted due to the replacement with DragDropManager", false)]
public static class RadDragAndDropManager

Inheritance: objectRadDragAndDropManager

Fields

AllowDragProperty

DependencyProperty

Identifies the AllowDrag attached property.

C#
public static readonly DependencyProperty AllowDragProperty

AllowDropProperty

DependencyProperty

Identifies the AllowDrop attached property.

C#
public static readonly DependencyProperty AllowDropProperty

AutoDragProperty

DependencyProperty

Identifies the AutoDrag attached property.

C#
public static readonly DependencyProperty AutoDragProperty

Identifies the DragArrowAdjusting event.

C#
public static readonly RoutedEvent DragArrowAdjustingEvent

DragInfoEvent

RoutedEvent

Identifies the DragInfo event.

C#
public static readonly RoutedEvent DragInfoEvent

DragQueryEvent

RoutedEvent

Identifies the DragQuery event.

C#
public static readonly RoutedEvent DragQueryEvent

DropInfoEvent

RoutedEvent

Identifies the DropInfo event.

C#
public static readonly RoutedEvent DropInfoEvent

DropQueryEvent

RoutedEvent

Identifies the DragQuery event.

C#
public static readonly RoutedEvent DropQueryEvent

Properties

Gets or sets the minimum length of the arrow that needs to be reached before it is shown.

C#
public static double ArrowVisibilityMinimumThreshold { get; set; }

Gets or sets a value indicating whether the ScrollViews should automatically scroll to bring content into view.

C#
public static bool AutoBringIntoView { get; set; }

Get or sets the relative horizontal and vertical offset of the drag cue. These values could be negative.

C#
public static Point DragCueOffset { get; set; }

Gets or sets the distance in pixels that the user needs to drag an object before a real drag operation starts. This prevents incidental drag on mouse press.

C#
public static double DragStartThreshold { get; set; }

Enables RadDragAndDropManager to use the native drag/drop system capabilities.

C#
public static bool EnableNativeDrag { get; set; }

Gets or sets the execution mode of the drag operations.

C#
public static DragExecutionMode ExecutionMode { get; set; }
Property Value:

The execution mode.

Gets a value indicating whether there is a dragging in process.

C#
public static bool IsDragging { get; }

Gets the status of the current drag and drop process.

C#
public static DragDropOptions Options { get; }

Methods

Adds a handler to for the DragArrowAdjusting routed event.

C#
public static void AddDragArrowAdjustingHandler(DependencyObject target, EventHandler<DragArrowAdjustingEventArgs> handler)
Parameters:targetDependencyObject

The element to add handler to.

handlerEventHandler<DragArrowAdjustingEventArgs>

The handler for the event.

Adds a handler to for the DragInfo routed event.

C#
public static void AddDragInfoHandler(DependencyObject target, EventHandler<DragDropEventArgs> handler)
Parameters:targetDependencyObject

The element to add handler to.

handlerEventHandler<DragDropEventArgs>

The handler for the event.

Adds a handler to for the DragQuery routed event.

C#
public static void AddDragQueryHandler(DependencyObject target, EventHandler<DragDropQueryEventArgs> handler)
Parameters:targetDependencyObject

The element to add handler to.

handlerEventHandler<DragDropQueryEventArgs>

The handler for the event.

Adds a handler to for the DropInfo routed event.

C#
public static void AddDropInfoHandler(DependencyObject target, EventHandler<DragDropEventArgs> handler)
Parameters:targetDependencyObject

The element to add handler to.

handlerEventHandler<DragDropEventArgs>

The handler for the event.

Adds a handler to for the DropQuery routed event.

C#
public static void AddDropQueryHandler(DependencyObject target, EventHandler<DragDropQueryEventArgs> handler)
Parameters:targetDependencyObject

The element to add handler to.

handlerEventHandler<DragDropQueryEventArgs>

The handler for the event.

Cancels the current drag operation.

C#
public static void CancelDrag()

GenerateArrowCue()

ContentControl

Generates an arrow content control that can be used in as an arrow cue in the drag/drop operation.

C#
public static ContentControl GenerateArrowCue()
Returns:

ContentControl

A new drag arrow cue element.

Creates a drag/drop visual cue based on the default settings of the Drag/Drop manager.

C#
public static DragVisualCue GenerateVisualCue()
Returns:

DragVisualCue

Creates a drag/drop visual cue based on the default settings of the Drag/Drop manager.

C#
public static DragVisualCue GenerateVisualCue(FrameworkElement source)
Parameters:sourceFrameworkElement

If provided, the properties of the visual cue will be set to match this element.

Returns:

DragVisualCue

A new instance of the DragVisualCue class.

Gets the AllowDrag attached property.

C#
public static bool GetAllowDrag(DependencyObject obj)
Parameters:objDependencyObject

The object to get the property for.

Returns:

bool

Gets the AllowDrop attached property.

C#
public static bool GetAllowDrop(DependencyObject obj)
Parameters:objDependencyObject

The object to get the property for.

Returns:

bool

Gets the AutoDrag attached property.

C#
public static bool GetAutoDrag(DependencyObject obj)
Parameters:objDependencyObject

The object to set the property to.

Returns:

bool

Initialize the RadDragAndDropManager infrastructure.

C#
public static void Initialize()

Removes a handler for the DragArrowAdjusting routed event.

C#
public static void RemoveDragArrowAdjustingHandler(DependencyObject target, EventHandler<DragArrowAdjustingEventArgs> handler)
Parameters:targetDependencyObject

The element to remove the handler from.

handlerEventHandler<DragArrowAdjustingEventArgs>

The handler for the event.

Removes a handler for the DragInfo routed event.

C#
public static void RemoveDragInfoHandler(DependencyObject target, EventHandler<DragDropEventArgs> handler)
Parameters:targetDependencyObject

The element to remove the handler from.

handlerEventHandler<DragDropEventArgs>

The handler for the event.

Removes a handler for the DragQuery routed event.

C#
public static void RemoveDragQueryHandler(DependencyObject target, EventHandler<DragDropQueryEventArgs> handler)
Parameters:targetDependencyObject

The element to remove the handler from.

handlerEventHandler<DragDropQueryEventArgs>

The handler for the event.

Removes a handler for the DropInfo routed event.

C#
public static void RemoveDropInfoHandler(DependencyObject target, EventHandler<DragDropEventArgs> handler)
Parameters:targetDependencyObject

The element to remove the handler from.

handlerEventHandler<DragDropEventArgs>

The handler for the event.

Removes a handler for the DropQuery routed event.

C#
public static void RemoveDropQueryHandler(DependencyObject target, EventHandler<DragDropQueryEventArgs> handler)
Parameters:targetDependencyObject

The element to remove the handler from.

handlerEventHandler<DragDropQueryEventArgs>

The handler for the event.

Sets the AllowDrag attached property.

C#
public static void SetAllowDrag(DependencyObject obj, bool value)
Parameters:objDependencyObject

The object to set the property to.

valuebool

The value of the property.

Sets the AllowDrop attached property.

C#
public static void SetAllowDrop(DependencyObject obj, bool value)
Parameters:objDependencyObject

The object to set the property to.

valuebool

The value of the property.

Sets the AutoDrag attached property.

C#
public static void SetAutoDrag(DependencyObject obj, bool value)
Parameters:objDependencyObject

The object to set the property to.

valuebool

The value of the property.

Starts a drag operation. The DragSource parameter cannot be null.

C#
public static void StartDrag(FrameworkElement dragSource, object payload, object dragCue)
Parameters:dragSourceFrameworkElement

The element that is a source of the DragDrop.

payloadobject

The payload of the DragDrop. Can be null.

dragCueobject

The drag cue of the DragDrop. Can be null.