ClassRadListBoxDragDropHelper
Represents drag and drop helper for the RadListBox control.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
public class RadListBoxDragDropHelper : DragDropHelper<ListBoxDragDropBehavior, DragDropState>
Inheritance: objectDragDropHelper<ListBoxDragDropBehavior, DragDropState>RadListBoxDragDropHelper
Inherited Members
Constructors
RadListBoxDragDropHelper()
Initializes a new instance of the RadListBoxDragDropHelper class.
Declaration
public RadListBoxDragDropHelper()
Methods
CreateStateForDrop(FrameworkElement, FrameworkElement, object, Type)
Creates and initializes a DragDropState from the provided DragEventArgs.
Declaration
protected override DragDropState CreateStateForDrop(FrameworkElement dropTarget, FrameworkElement dropItemsControl, object data, Type itemType)
Parameters
dropTarget
FrameworkElement
dropItemsControl
FrameworkElement
data
itemType
Returns
Overrides
DragDropCompleted(FrameworkElement, object, Type, bool)
When overridden in a derived class allows calling custom code on the DragDropCompleted event.
DragLeave(FrameworkElement, FrameworkElement, object, Type)
Hides the drop visual on mouse leave.
Declaration
protected override void DragLeave(FrameworkElement dropTarget, FrameworkElement dropItemsControl, object data, Type itemType)
Parameters
dropTarget
FrameworkElement
The object that is being dropped.
dropItemsControl
FrameworkElement
The destination ItemsControl.
data
The drag and drop data.
itemType
The data type of the dragged item.
Overrides
DragOver(FrameworkElement, FrameworkElement, object, Type)
When overridden in a derived class allows calling custom code on the DragOver event.
Drop(FrameworkElement, FrameworkElement, object, Type)
Drops the specified drop target.
FindDragSource(FrameworkElement)
Finds the ListBox that contains the provided element.
Declaration
protected override FrameworkElement FindDragSource(FrameworkElement element)
Parameters
element
FrameworkElement
The element that raised the DragInitialize event.
Returns
FrameworkElement
Overrides
FindDraggedItem(FrameworkElement)
Finds the ListBoxItem that contains the provided element.
Declaration
protected override FrameworkElement FindDraggedItem(FrameworkElement element)
Parameters
element
FrameworkElement
The element that raised the DragInitialize event.
Returns
FrameworkElement
Overrides
FindDropItemsControl(FrameworkElement, object)
Finds the ListBox that should accept the dragged items.
Declaration
protected override FrameworkElement FindDropItemsControl(FrameworkElement element, object data)
Parameters
element
FrameworkElement
The element that raised the Drop event.
data
The DataObject for the current drag operation.
Returns
FrameworkElement
Overrides
FindDropTarget(FrameworkElement)
Finds a ListBoxItem from the target control that contains the provided element.
Declaration
protected override FrameworkElement FindDropTarget(FrameworkElement element)
Parameters
element
FrameworkElement
The element that raised the Drop event.
Returns
FrameworkElement
Overrides
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
protected override IEnumerable<object> GetDraggedItems(FrameworkElement draggedItem)
Parameters
draggedItem
FrameworkElement
The source control of the drag operation.
Returns
The items that should be dragged.
Overrides
SetDropVisualPlaceholder(ContentPresenter)
Initialize the DragVisualPlaceholder used in the DragAndDrop operations.
Declaration
public void SetDropVisualPlaceholder(ContentPresenter dropVisualPlaceholder)
Parameters
dropVisualPlaceholder
ContentPresenter
SetDropVisualProvider(IDropVisualProvider)
Initialize the DropVisualProvider used in the DragAndDrop operations.
Declaration
public void SetDropVisualProvider(IDropVisualProvider dropVisualProvider)
Parameters
dropVisualProvider