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

Helper class that binds the DragDropManager events with a DragDropBehavior.

Definition

Namespace:Telerik.Windows.DragDrop.Behaviors

Assembly:Telerik.Windows.Controls.GridView.dll

Syntax:

C#
public class GridViewDragDropHelper : DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>

Inheritance: objectDragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>GridViewDragDropHelper

Inherited Members DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsOfType(IEnumerable, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetInferredItemType(IEnumerable)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetDraggedItems(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsSource(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetContainerFromItem(FrameworkElement, object)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.CreateDragVisualProviderState(Point, FrameworkElement, GridViewDragDropState)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDragSource(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDraggedItem(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropItemsControl(FrameworkElement, object)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropTarget(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemType(FrameworkElement)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragDropCompleted(FrameworkElement, object, Type, bool)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragOver(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragLeave(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.Drop(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.CreateStateForDrop(FrameworkElement, FrameworkElement, object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsFromDataObject(object, Type)DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DataConverterDragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragDropBehaviorDragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.DragVisualProvider...

Constructors

C#
public GridViewDragDropHelper()

Methods

Finds the GridViewRow that contains the provided element.

C#
protected override FrameworkElement FindDraggedItem(FrameworkElement element)
Parameters:elementFrameworkElement

The element that raised the DragInitialize event.

Returns:

FrameworkElement

Overrides: DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDraggedItem(FrameworkElement)

Finds the control that contains the provided element. In case of a ListBox drag-drop implementation, this method should return a ListBox.

C#
protected override FrameworkElement FindDragSource(FrameworkElement element)
Parameters:elementFrameworkElement

The element that raised the DragInitialize event.

Returns:

FrameworkElement

Overrides: DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDragSource(FrameworkElement)

Remarks:

Finds the RadGridView that contains the provided element.

Finds the target control that should accept the dragged items. In case of a ListBox drag-drop implementation, this method should return a ListBox.

C#
protected override FrameworkElement FindDropItemsControl(FrameworkElement element, object data)
Parameters:elementFrameworkElement

The element that raised the Drop event.

dataobject

The DataObject for the current drag operation.

Returns:

FrameworkElement

Overrides: DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropItemsControl(FrameworkElement, object)

Remarks:

Finds the RadGridView that should accept the dragged items.

Finds an item from the target control that contains the provided element. In case of a ListBox drag-drop implementation, this method should return a ListBoxItem.

C#
protected override FrameworkElement FindDropTarget(FrameworkElement element)
Parameters:elementFrameworkElement

The element that raised the Drop event.

Returns:

FrameworkElement

Overrides: DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.FindDropTarget(FrameworkElement)

Remarks:

Finds a RadGridView from the target control that contains the provided element.

Returns the container for the specified item. When overridden in a derived class allows usage of custom ItemContainerGenerators.

C#
protected override DependencyObject GetContainerFromItem(FrameworkElement control, object item)
Parameters:controlFrameworkElementitemobjectReturns:

DependencyObject

Overrides: DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetContainerFromItem(FrameworkElement, object)

When overridden in a derived class this method returns the items that should be dragged.

C#
protected override IEnumerable<object> GetDraggedItems(FrameworkElement draggedItem)
Parameters:draggedItemFrameworkElement

The source control of the drag operation.

Returns:

IEnumerable<object>

The items that should be dragged.

Overrides: DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetDraggedItems(FrameworkElement)

Remarks:

Returns the SelectedItems list of the RadGridView that contains the dragged row and adds the dragged row to the list if it is not already present there.

Returns a list containing the items of the specified control.

C#
protected override IList GetItemsSource(FrameworkElement element)
Parameters:elementFrameworkElementReturns:

IList

Overrides: DragDropHelper<GridViewDragDropBehavior, GridViewDragDropState>.GetItemsSource(FrameworkElement)

Remarks:

Returns a list containing the items of the specified RadGridView.