Back to Devexpress

How to: Adjust the Control's Drag and Drop Options

windowsforms-4904-controls-and-libraries-navigation-controls-navigation-bar-examples-layout-how-to-adjust-the-controls-drag-and-drop-options.md

latest885 B
Original Source

How to: Adjust the Control's Drag and Drop Options

  • Aug 01, 2019

the following sample code uses the NavBarControl.DragDropFlags property to modify the control’s drag and drop options. It prohibits dropping items from the same control and allows you to drop items from other NavBarControl.

csharp
using DevExpress.XtraNavBar;
// ...
navBarControl1.DragDropFlags &= ~NavBarDragDrop.AllowDrop;
navBarControl1.DragDropFlags |= NavBarDragDrop.AllowOuterDrop;
vb
Imports DevExpress.XtraNavBar
' ...
With NavBarControl1
   .DragDropFlags = .DragDropFlags And Not NavBarDragDrop.AllowDrop
   .DragDropFlags = .DragDropFlags Or NavBarDragDrop.AllowOuterDrop
End With