ClassTreeViewDragDropService
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TreeViewDragDropService : RadDragDropService, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IMessageListener
Inheritance: objectDisposableObjectRadObjectRadServiceRadDragDropServiceTreeViewDragDropService
Derived Classes:
Implements:
Inherited Members
Constructors
TreeViewDragDropService(RadTreeViewElement)
Declaration
public TreeViewDragDropService(RadTreeViewElement owner)
Parameters
owner
Properties
Owner
Declaration
protected RadTreeViewElement Owner { get; }
Property Value
ShowDragHint
Gets or sets a value indicating whether drag hint should be shown.
Declaration
public bool ShowDragHint { get; set; }
Property Value
true if [show drag hint]; otherwise, false.
ShowDropHint
Gets or sets a value indicating whether show drop hint should be shown.
Declaration
public bool ShowDropHint { get; set; }
Property Value
true if [show drop hint]; otherwise, false.
Methods
CanDragOver(DropPosition, TreeNodeElement)
Declaration
protected virtual bool CanDragOver(DropPosition dropPosition, TreeNodeElement targetNodeElement)
Parameters
dropPosition
targetNodeElement
Returns
CanStart(object)
Determines whether the service may be started. Validation is as follows:
- Check whether Enabled is true.
- Check the context through IsContextValid method. An exception is thrown if context is invalid.
- Checks the current state - it should be Initial or Stopped.
CancelPreviewDragDrop(RadDropEventArgs)
Declaration
protected virtual bool CancelPreviewDragDrop(RadDropEventArgs e)
Parameters
e
Returns
CreateTreeNode(RadTreeNode)
Creates a new tree node in the target RadTreeView using the information from the source tree.
Declaration
protected virtual RadTreeNode CreateTreeNode(RadTreeNode sourceTreeNode)
Parameters
sourceTreeNode
The source tree node.
Returns
A new instance of RadTreeNode if successfull.
DisposeHint()
Declaration
protected virtual void DisposeHint()
DisposeManagedResources()
Releases managed resources by clearing the property store and disposing value animators to prevent memory leaks.
Declaration
protected override void DisposeManagedResources()
Overrides
GetDraggedNodes(RadTreeNode)
Declaration
protected virtual List<RadTreeNode> GetDraggedNodes(RadTreeNode draggedNode)
Parameters
draggedNode
Returns
List<RadTreeNode>
GetDropPosition(Point, TreeNodeElement)
Declaration
protected DropPosition GetDropPosition(Point dropLocation, TreeNodeElement targetNodeElement)
Parameters
dropLocation
targetNodeElement
Returns
GetSelectedNodes(RadTreeNode)
Declaration
protected virtual List<RadTreeNode> GetSelectedNodes(RadTreeNode draggedNode)
Parameters
draggedNode
Returns
List<RadTreeNode>
HandleMouseMove(Point)
Declaration
protected override void HandleMouseMove(Point mousePosition)
Parameters
mousePosition
Overrides
HideHintWindow()
Declaration
public void HideHintWindow()
IsDropTargetValid(ISupportDrop)
Declaration
protected override bool IsDropTargetValid(ISupportDrop dropTarget)
Parameters
dropTarget
Returns
Overrides
OnPreviewDragDrop(RadDropEventArgs)
Declaration
protected override void OnPreviewDragDrop(RadDropEventArgs e)
Parameters
e
Overrides
OnPreviewDragHint(PreviewDragHintEventArgs)
Declaration
protected override void OnPreviewDragHint(PreviewDragHintEventArgs e)
Parameters
e
Overrides
OnPreviewDragHintWithDropPosition(TreeViewPreviewDragHintEventArgs)
Declaration
protected virtual void OnPreviewDragHintWithDropPosition(TreeViewPreviewDragHintEventArgs e)
Parameters
e
OnPreviewDragOver(RadDragOverEventArgs)
Declaration
protected override void OnPreviewDragOver(RadDragOverEventArgs e)
Parameters
e
Overrides
OnStarted()
Notifies that the service has been successfully started. Allows inheritors to perform some additional logic upon start.
Declaration
protected override void OnStarted()
Overrides
OnStopped()
Notifies that a running operation has stopped. Allows inheritors to perform some additional logic upon stop.
Declaration
protected override void OnStopped()
Overrides
OnStopping(RadServiceStoppingEventArgs)
Notifies that a stop request has occured. Cancelable.
Declaration
protected override void OnStopping(RadServiceStoppingEventArgs e)
Parameters
e
Overrides
PerformDragDrop(Point, TreeNodeElement, List<RadTreeNode>)
Declaration
protected virtual void PerformDragDrop(Point dropLocation, TreeNodeElement targetNodeElement, List<RadTreeNode> draggedNodes)
Parameters
dropLocation
targetNodeElement
draggedNodes
List<RadTreeNode>
PerformDragDropCore(DropPosition, RadTreeNode, List<RadTreeNode>)
Declaration
protected virtual void PerformDragDropCore(DropPosition position, RadTreeNode targetNode, List<RadTreeNode> draggedNodes)
Parameters
position
targetNode
draggedNodes
List<RadTreeNode>
PerformStart()
Performs the core Start logic.
Declaration
protected override void PerformStart()
Overrides
PerformStop()
Stops the service. Performs the core logic.
Declaration
protected override void PerformStop()
Overrides
PrepareDragHint(TreeNodeElement)
Declaration
protected virtual void PrepareDragHint(TreeNodeElement nodeElement)
Parameters
nodeElement
SetHintWindowPosition(Point)
Declaration
protected override void SetHintWindowPosition(Point mousePt)
Parameters
mousePt
Overrides
ShowHintWindow()
Declaration
public void ShowHintWindow()
UpdateHintPosition(Point)
Declaration
protected virtual void UpdateHintPosition(Point mousePosition)
Parameters
mousePosition