Handles drag-and-drop of selected items between unbound list elements and displays drop-position feedback.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ListControlDragDropService : RadDragDropService, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IMessageListener
Inheritance: objectDisposableObjectRadObjectRadServiceRadDragDropServiceListControlDragDropService...
Implements:
Inherited Members
Constructors
Initializes the service for the list element that starts item drags.
public ListControlDragDropService(RadListElement owner)
The source list element.
Methods
Determines whether the drop-position hint is allowed at the current vertical pointer position.
protected virtual bool CanShowDropHint(Point mousePosition)
The current pointer position in screen coordinates.
Returns:false when the drop target is not a list or the pointer's list-relative Y coordinate is between one-third and two-thirds of the target's ItemHeight.
Disposes the layered window used to display the drop-position hint.
protected virtual void DisposeHint()
Updates or disposes the drop-position hint as the pointer moves over a list drop target.
protected override void HandleMouseMove(Point mousePosition)
The current pointer position in screen coordinates.
Overrides:
Moves the source list's selected items only when the event is unhandled and both source and target lists are unbound.
protected override void OnPreviewDragDrop(RadDropEventArgs e)
The drop event that identifies the target and whether another handler has processed the drop.
Overrides:
Transfers the source list's selected items to the target list. Items inserted at a specified index are marked active and selected.
protected virtual void OnPreviewDragDropCore(RadListElement targetList, RadListVisualItem targetElement)
The list receiving the items.
targetElementRadListVisualItemThe visual item used as the insertion position, or null when no item is hit.
If the insertion index exceeds the target's item count, the item is appended without setting its active or selected state.
protected override void OnPreviewDragHint(PreviewDragHintEventArgs e)
Overrides:
Sets drop acceptance from the target list's AllowDragDrop setting.
protected override void OnPreviewDragOver(RadDragOverEventArgs e)
The drag-over event containing the hit target and drop-acceptance result.
Overrides:
Captures the data item represented by the drag context as the item being dragged.
protected override void PerformStart()
Overrides:
Releases drop-hint resources and clears the captured dragged item when the drag ends.
protected override void PerformStop()
Overrides:
Creates the red, one-pixel drop-position line sized to the target list's visible content area.
protected virtual void PrepareDragHint(RadListElement listElement)
The list whose bounds determine the hint width.
Positions the hint at the top or bottom edge of the visual item under the pointer.
protected virtual void UpdateHintPosition(Point mousePosition)
The current pointer position in screen coordinates.