Class TreeViewDragDropController
Represents a class that handles drag and drop operations in SfTreeView.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.TreeView
Assembly: Syncfusion.SfTreeView.WPF.dll
Syntax
public class TreeViewDragDropController : Object, IDisposable
Constructors
TreeViewDragDropController()
Initializes a new instance of the TreeViewDragDropController class.
Declaration
public TreeViewDragDropController()
Fields
TreeView
Gets the reference to the SfTreeView control.
Declaration
protected SfTreeView TreeView
Field Value
Type |
---|
SfTreeView |
Properties
AutoExpandDelay
Gets or sets the time delay to expand the item automatically when CanAutoExpand property is true.
Declaration
public TimeSpan AutoExpandDelay { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The default value is 3 sec. |
CanAutoExpand
Gets or sets a value indicating whether node should be expanded when hover the dragged nodes for specific time interval when DropPosition is DropAsChild. Interval time is based upon the AutoExpandDelay property.
Declaration
public bool CanAutoExpand { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
Dispose()
Disposes all the resources used by the TreeViewDragDropController class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the TreeViewDragDropController class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release all the resources. |
GetDropPosition(DragEventArgs, Int32)
Gets the dropping position of a dragging item.
Declaration
protected virtual DropPosition GetDropPosition(DragEventArgs args, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DragEventArgs | args | The System.Windows.DragEventArgs that contains the event data. |
System.Int32 | rowIndex | Specified index on which the mouse is hovered. |
Returns
Type | Description |
---|---|
DropPosition | Returns appropriate position at which the dragging items would be dropped. |
ProcessDragSourceOnDrop(SfTreeView, ObservableCollection<TreeViewNode>)
Removes dragged nodes from the SfTreeView while dropping.
Declaration
protected virtual void ProcessDragSourceOnDrop(SfTreeView sourceTreeView, ObservableCollection<TreeViewNode> treeViewNodes)
Parameters
Type | Name | Description |
---|---|---|
SfTreeView | sourceTreeView | The SfTreeView from which the drag operation is initiated. |
System.Collections.ObjectModel.ObservableCollection<TreeViewNode> | treeViewNodes | The collection of TreeViewNode that is being dragged. |
ProcessDropOnBoundView(SfTreeView, ObservableCollection<TreeViewNode>, DropPosition, Int32)
Process drop operation in bound view.
Declaration
protected virtual void ProcessDropOnBoundView(SfTreeView sourceTreeView, ObservableCollection<TreeViewNode> treeViewNodes, DropPosition dropPosition, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfTreeView | sourceTreeView | The SfTreeView from which the drag operation is initiated. |
System.Collections.ObjectModel.ObservableCollection<TreeViewNode> | treeViewNodes | The collection of TreeViewNode that is being dragged. |
DropPosition | dropPosition | The position at which dragging items will be dropped. |
System.Int32 | rowIndex | Specified row index on which the dragged items is dropped. |
ProcessDropOnUnboundView(SfTreeView, ObservableCollection<TreeViewNode>, DropPosition, Int32)
Process drop operations on unbound view.
Declaration
protected virtual void ProcessDropOnUnboundView(SfTreeView sourceTreeView, ObservableCollection<TreeViewNode> treeViewNodes, DropPosition dropPosition, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfTreeView | sourceTreeView | The SfTreeView from which the drag operation is initiated. |
System.Collections.ObjectModel.ObservableCollection<TreeViewNode> | treeViewNodes | The collection of TreeViewNode that is being dragged. |
DropPosition | dropPosition | The position at which dragging items will be dropped. |
System.Int32 | rowIndex | Specified row index on which the dragged items is dropped. |
ProcessOnDragEnter()
Occurs when the input system reports an underlying drag enter event with this element as the origin.
Declaration
protected void ProcessOnDragEnter()
ProcessOnDragLeave(DragEventArgs, Int32)
Occurs when the input system reports an underlying drag event with this element as the origin.
Declaration
protected virtual void ProcessOnDragLeave(DragEventArgs args, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DragEventArgs | args | The System.Windows.DragEventArgs that contains the event data. |
System.Int32 | rowIndex | Specifies row index based on mouse point. |
ProcessOnDragOver(DragEventArgs, Int32)
Occurs when the input system reports an underlying drag event with this element as the potential drop target.
Declaration
protected virtual void ProcessOnDragOver(DragEventArgs args, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DragEventArgs | args | The DragEventArgs that contains the event data. |
System.Int32 | rowIndex | Specifies row index based on mouse point. |
ProcessOnDragStarting(MouseEventArgs, Int32)
Occurs when a drag operation is initiated.
Declaration
protected virtual void ProcessOnDragStarting(MouseEventArgs args, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | args | The DragEventArgs that contains the event data. |
System.Int32 | rowIndex | Specifies the row index based on mouse point. |
ProcessOnDrop(DragEventArgs, Int32)
Occurs when the input system reports an underlying drop event with this element as the drop target.
Declaration
protected virtual void ProcessOnDrop(DragEventArgs args, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DragEventArgs | args | The System.Windows.DragEventArgs that contains the event data. |
System.Int32 | rowIndex | Specifies row index based on mouse point. |
ShowDragDropPopup(DropPosition, ObservableCollection<TreeViewNode>, DragEventArgs)
Displays System.Windows.Controls.Primitives.Popup while dragging items in SfTreeView.
Declaration
protected virtual void ShowDragDropPopup(DropPosition dropPosition, ObservableCollection<TreeViewNode> draggingItems, DragEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DropPosition | dropPosition | The position at which the dragging items will be dropped. |
System.Collections.ObjectModel.ObservableCollection<TreeViewNode> | draggingItems | The collection of TreeViewNode that is being dragged. |
System.Windows.DragEventArgs | args | The System.Windows.DragEventArgs that contains the event data. |