KetticTreeView Drag and Drop Support in C#.NET
KetticTreeView provides drag and drop support to expand the Windows application capabilities. With this drag and drop support, the developers can easily drag and drop nodes within the TreeView control, between Kettic WinForms UI controls, locate the node place, drag and drop nodes in other elements, scroll up and down a dragging node automatically, expand a dragging node automatically, and fine-tune specific nodes when dragging and dropping. In the C# tutorial below, we shall show how to customize the drag and drop of TreeView behavior and how to customize the control to copy the nodes as is dropped.
C# Create Custom Drag and Drop behavior for KetticTreeView
C# Create Element for Applying Drag and Drop to KetticTreeView
When creating the custom drag and drop behavior, we can apply it to the KetticTreeView through the CreateDragDropService method of KetticTreeViewElement. The following C# code shows how to create a new element to achieve this.
Apply Custom Drag and Drop to KetticTreeView in C#.NET
After creating the element, we can apply the CustomTreeViewElement in the tree view. This is achieved via passing a new instance of the element in the CreateTreeViewElement of KetticTreeView decendant C# class. The C# code below shows how to do this
And then, we can populate the tree view and check the drag and drop functionality of KetticTreeView control. The following C# code demonstrates how to achieve this.
| ![]() UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlKeyboard SupportDesign Time SupportBuild PropertyContext MenuTreeView - NodeAdd & Remove NodesReorder NodesFormat NodesEdit NodesSelect NodesFilter NodesCustom Filter NodesSort NodesCustom Sort NodesFind Sort NodesData BindingBasicsDatabaseXML DataDrag and DropCustomizationContext MenuCustomizationAssign ScreenTipLocalizationWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |