WPF

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeGridRowDragDropController - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TreeGridRowDragDropController

    Represents a class that handles row drag-and-drop operations in SfTreeGrid.

    Inheritance
    System.Object
    TreeGridRowDragDropController
    Implements
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.UI.Xaml.TreeGrid
    Assembly: Syncfusion.SfGrid.WPF.dll
    Syntax
    public class TreeGridRowDragDropController : IDisposable
    Remarks

    It provides the set of public properties and virtual methods to handle the row drag-and-drop operations in SfTreeGrid.

    Constructors

    TreeGridRowDragDropController()

    Initializes a new instance of TreeGridRowDragDropController class.

    Declaration
    public TreeGridRowDragDropController()

    Fields

    autoExpandNode

    Declaration
    protected TreeNode autoExpandNode
    Field Value
    Type Description
    TreeNode

    timer

    Declaration
    protected DispatcherTimer timer
    Field Value
    Type Description
    System.Windows.Threading.DispatcherTimer

    TreeGrid

    Gets the reference to the SfTreeGrid control.

    Declaration
    protected SfTreeGrid TreeGrid
    Field Value
    Type Description
    SfTreeGrid

    Properties

    AutoExpandDelay

    Gets or sets the time delay to expand the node automatically.

    Declaration
    public TimeSpan AutoExpandDelay { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The default value is 3 sec.

    CanAutoExpand

    Gets or sets a value which indicates whether need to auto expand the node if it is not expanded when DropPosition is DropAsChild.

    Declaration
    public bool CanAutoExpand { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    CloseDraggablePopUp()

    Closes the Drag popup indicator.

    Declaration
    protected virtual void CloseDraggablePopUp()

    CloseDragIndicators()

    Closes the Drag arrow indication and clears all the row's VSM applied.

    Declaration
    protected virtual void CloseDragIndicators()

    Dispose()

    Disposes all the resources used by the TreeGridRowDragDropController class.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposes all the resources used by the TreeGridRowDragDropController class.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true to release all the resources.

    GetDropPosition(DragEventArgs, RowColumnIndex)

    Gets the dropping position of a dragging row.

    Declaration
    protected virtual DropPosition GetDropPosition(DragEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specified index on which the mouse is hovered.

    Returns
    Type Description
    DropPosition

    Returns appropriate drop position DropPosition if row can drop at the specified index otherwise none.

    OnAttach(SfTreeGrid)

    Wiring the SfTreeGrid events in OnAttach method.

    Declaration
    protected void OnAttach(SfTreeGrid TreeGrid)
    Parameters
    Type Name Description
    SfTreeGrid TreeGrid

    OnDetach()

    To Reset the elements

    Declaration
    protected void OnDetach()

    ProcessDragSourceOnDrop(SfTreeGrid, ObservableCollection<TreeNode>)

    Remove dragged nodes from tree grid while dropping.

    Declaration
    protected virtual void ProcessDragSourceOnDrop(SfTreeGrid sourceTreeGrid, ObservableCollection<TreeNode> nodes)
    Parameters
    Type Name Description
    SfTreeGrid sourceTreeGrid

    the grid from which drag operation in initiated.

    System.Collections.ObjectModel.ObservableCollection<TreeNode> nodes

    dragged nodes.

    ProcessDropOnNestedView(RowColumnIndex, DropPosition, ObservableCollection<TreeNode>, SfTreeGrid)

    Process drop operations in nested view.

    Declaration
    protected virtual void ProcessDropOnNestedView(RowColumnIndex rowColumnIndex, DropPosition dropPosition, ObservableCollection<TreeNode> nodes, SfTreeGrid sourceTreeGrid)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    dropped row column index.

    DropPosition dropPosition

    drop position.

    System.Collections.ObjectModel.ObservableCollection<TreeNode> nodes

    the dragging nodes which needs to be dropped.

    SfTreeGrid sourceTreeGrid

    the grid from which drag operation in initiated.

    ProcessDropOnSelfRelationalView(RowColumnIndex, DropPosition, ObservableCollection<TreeNode>, SfTreeGrid)

    Process drop operations in self relational view.

    Declaration
    protected virtual void ProcessDropOnSelfRelationalView(RowColumnIndex rowColumnIndex, DropPosition dropPosition, ObservableCollection<TreeNode> nodes, SfTreeGrid sourceTreeGrid)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    dropped row column index.

    DropPosition dropPosition

    drop position.

    System.Collections.ObjectModel.ObservableCollection<TreeNode> nodes

    the dragging nodes which needs to be dropped.

    SfTreeGrid sourceTreeGrid

    the grid from which drag operation in initiated.

    ProcessDropOnUnboundView(RowColumnIndex, DropPosition, ObservableCollection<TreeNode>, SfTreeGrid)

    Process drop operations in unbound view.

    Declaration
    protected virtual void ProcessDropOnUnboundView(RowColumnIndex rowColumnIndex, DropPosition dropPosition, ObservableCollection<TreeNode> nodes, SfTreeGrid sourceTreeGrid)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    dropped row column index.

    DropPosition dropPosition

    drop position.

    System.Collections.ObjectModel.ObservableCollection<TreeNode> nodes

    the dragging nodes which needs to be dropped.

    SfTreeGrid sourceTreeGrid

    the grid from which drag operation in initiated.

    ProcessOnDragLeave(DragEventArgs, RowColumnIndex)

    Occurs when the input system reports an underlying drag event with this element as the origin.

    Declaration
    protected virtual void ProcessOnDragLeave(DragEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specifies the row column index based on the mouse point.

    ProcessOnDragOver(DragEventArgs, RowColumnIndex)

    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, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specifies the row column index based on the mouse point.

    ProcessOnDragStarting(MouseEventArgs, RowColumnIndex)

    Occurs when a drag operation is initiated.

    Declaration
    protected virtual void ProcessOnDragStarting(MouseEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs args

    An Windows.UI.Xaml.DragStartingEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specifies the row column index based on the mouse point.

    ProcessOnDrop(DragEventArgs, RowColumnIndex)

    Occurs when the input system reports an underlying drop event with this element as the drop target.

    Declaration
    protected virtual void ProcessOnDrop(DragEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs args

    An Windows.UI.Xaml.DragEventArgs that contains the event data.

    RowColumnIndex rowColumnIndex

    Specifies the row column index based on the mouse point.

    ShowDragIndicators(DropPosition, RowColumnIndex, DragEventArgs)

    Sets drag indicators in appropriate position.

    Declaration
    protected virtual void ShowDragIndicators(DropPosition dropPosition, RowColumnIndex rowColumnIndex, DragEventArgs args)
    Parameters
    Type Name Description
    DropPosition dropPosition

    Indicates the drop position, based on that the indicators will shown.

    RowColumnIndex rowColumnIndex

    Specifies the rowColumn index based on mouse hover.

    System.Windows.DragEventArgs args

    Events

    DragLeave

    This event occurs when leave a drag-and-drop operation.

    Declaration
    public event EventHandler<TreeGridRowDragLeaveEventArgs> DragLeave
    Event Type
    Type Description
    System.EventHandler<TreeGridRowDragLeaveEventArgs>

    DragOver

    This event occurs continuously while treenode is dragged within the target SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridRowDragOverEventArgs> DragOver
    Event Type
    Type Description
    System.EventHandler<TreeGridRowDragOverEventArgs>

    DragStart

    This event occurs when a drag-and-drop operation is starting.

    Declaration
    public event EventHandler<TreeGridRowDragStartEventArgs> DragStart
    Event Type
    Type Description
    System.EventHandler<TreeGridRowDragStartEventArgs>

    Drop

    This event occurs when a record is dropping within the target SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridRowDropEventArgs> Drop
    Event Type
    Type Description
    System.EventHandler<TreeGridRowDropEventArgs>

    Dropped

    This event occurs when a record is dropped within the target SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridRowDroppedEventArgs> Dropped
    Event Type
    Type Description
    System.EventHandler<TreeGridRowDroppedEventArgs>

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved