Class RadListBoxDragDropHelper
Represents drag and drop helper for the RadListBox control.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll
Syntax
public class RadListBoxDragDropHelper : DragDropHelper<ListBoxDragDropBehavior, DragDropState>
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
System.Windows.FrameworkElement
dropTarget
|
System.Windows.FrameworkElement
dropItemsControl
|
System.Object
data
|
System.Type
itemType
|
Returns
DragDropState
|
Overrides
DragDropCompleted(FrameworkElement, Object, Type, Boolean)
When overridden in a derived class allows calling custom code on the DragDropCompleted event.
Declaration
protected override void DragDropCompleted(FrameworkElement dropItemsControl, object data, Type itemType, bool wasCanceled)
Parameters
System.Windows.FrameworkElement
dropItemsControl
|
System.Object
data
|
System.Type
itemType
|
System.Boolean
wasCanceled
|
Overrides
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
System.Windows.FrameworkElement
dropTarget
The object that is being dropped. |
System.Windows.FrameworkElement
dropItemsControl
The destination ItemsControl. |
System.Object
data
The drag and drop data. |
System.Type
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.
Declaration
protected override DragDropEffects DragOver(FrameworkElement dropTarget, FrameworkElement dropItemsControl, object data, Type itemType)
Parameters
System.Windows.FrameworkElement
dropTarget
|
System.Windows.FrameworkElement
dropItemsControl
|
System.Object
data
|
System.Type
itemType
|
Returns
System.Windows.DragDropEffects
|
Overrides
Drop(FrameworkElement, FrameworkElement, Object, Type)
Drops the specified drop target.
Declaration
protected override void Drop(FrameworkElement dropTarget, FrameworkElement dropItemsControl, object data, Type itemType)
Parameters
System.Windows.FrameworkElement
dropTarget
|
System.Windows.FrameworkElement
dropItemsControl
|
System.Object
data
|
System.Type
itemType
|
Overrides
FindDraggedItem(FrameworkElement)
Finds the ListBoxItem that contains the provided element.
Declaration
protected override FrameworkElement FindDraggedItem(FrameworkElement element)
Parameters
System.Windows.FrameworkElement
element
The element that raised the DragInitialize event. |
Returns
System.Windows.FrameworkElement
|
Overrides
FindDragSource(FrameworkElement)
Finds the ListBox that contains the provided element.
Declaration
protected override FrameworkElement FindDragSource(FrameworkElement element)
Parameters
System.Windows.FrameworkElement
element
The element that raised the DragInitialize event. |
Returns
System.Windows.FrameworkElement
|
Overrides
FindDropItemsControl(FrameworkElement, Object)
Finds the ListBox that should accept the dragged items.
Declaration
protected override FrameworkElement FindDropItemsControl(FrameworkElement element, object data)
Parameters
System.Windows.FrameworkElement
element
The element that raised the Drop event. |
System.Object
data
The DataObject for the current drag operation. |
Returns
System.Windows.FrameworkElement
|
Overrides
FindDropTarget(FrameworkElement)
Finds a ListBoxItem from the target control that contains the provided element.
Declaration
protected override FrameworkElement FindDropTarget(FrameworkElement element)
Parameters
System.Windows.FrameworkElement
element
The element that raised the Drop event. |
Returns
System.Windows.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
System.Windows.FrameworkElement
draggedItem
The source control of the drag operation. |
Returns
System.Collections.Generic.IEnumerable<System.Object>
The items that should be dragged. |
Overrides
SetDropVisualPlaceholder(ContentPresenter)
Initialize the DragVisualPlaceholder used in the DragAndDrop operations.
Declaration
public void SetDropVisualPlaceholder(ContentPresenter dropVisualPlaceholder)
Parameters
System.Windows.Controls.ContentPresenter
dropVisualPlaceholder
|
SetDropVisualProvider(IDropVisualProvider)
Initialize the DropVisualProvider used in the DragAndDrop operations.
Declaration
public void SetDropVisualProvider(IDropVisualProvider dropVisualProvider)
Parameters
IDropVisualProvider
dropVisualProvider
|