Class
ListBoxDragDropHelper

Provides helper methods for drag-and-drop operations in ListBox controls.

Definition

Namespace:Telerik.Windows.DragDrop.Behaviors

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public class ListBoxDragDropHelper : DragDropHelper<ListBoxDragDropBehavior, DragDropState>

Inheritance: objectDragDropHelper<ListBoxDragDropBehavior, DragDropState>ListBoxDragDropHelper

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

Constructors

ListBoxDragDropHelper()

Declaration

cs-api-definition
public ListBoxDragDropHelper()

Methods

FindDragSource(FrameworkElement)

Finds the ListBox that contains the provided element.

Declaration

cs-api-definition
protected override FrameworkElement FindDragSource(FrameworkElement element)

Parameters

element

FrameworkElement

The element that raised the DragInitialize event.

Returns

FrameworkElement

Overrides DragDropHelper<ListBoxDragDropBehavior, DragDropState>.FindDragSource(FrameworkElement)

FindDraggedItem(FrameworkElement)

Finds the ListBoxItem that contains the provided element.

Declaration

cs-api-definition
protected override FrameworkElement FindDraggedItem(FrameworkElement element)

Parameters

element

FrameworkElement

The element that raised the DragInitialize event.

Returns

FrameworkElement

Overrides DragDropHelper<ListBoxDragDropBehavior, DragDropState>.FindDraggedItem(FrameworkElement)

FindDropItemsControl(FrameworkElement, object)

Finds the ListBox that should accept the dragged items.

Declaration

cs-api-definition
protected override FrameworkElement FindDropItemsControl(FrameworkElement element, object data)

Parameters

element

FrameworkElement

The element that raised the Drop event.

data

object

The DataObject for the current drag operation.

Returns

FrameworkElement

Overrides DragDropHelper<ListBoxDragDropBehavior, DragDropState>.FindDropItemsControl(FrameworkElement, object)

FindDropTarget(FrameworkElement)

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

Declaration

cs-api-definition
protected override FrameworkElement FindDropTarget(FrameworkElement element)

Parameters

element

FrameworkElement

The element that raised the Drop event.

Returns

FrameworkElement

Overrides DragDropHelper<ListBoxDragDropBehavior, DragDropState>.FindDropTarget(FrameworkElement)

GetDraggedItems(FrameworkElement)

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

Declaration

cs-api-definition
protected override IEnumerable<object> GetDraggedItems(FrameworkElement draggedItem)

Parameters

draggedItem

FrameworkElement

The source control of the drag operation.

Returns

IEnumerable<object>

The items that should be dragged.

Overrides DragDropHelper<ListBoxDragDropBehavior, DragDropState>.GetDraggedItems(FrameworkElement)