Back to Devexpress

NavBarGroup.DragDropFlags Property

windowsforms-devexpress-dot-xtranavbar-dot-navbargroup-b7d59076.md

latest4.4 KB
Original Source

NavBarGroup.DragDropFlags Property

Gets or sets a set of flags controlling the group’s behavior as it relates to link drag and drop operations.

Namespace : DevExpress.XtraNavBar

Assembly : DevExpress.XtraNavBar.v25.2.dll

NuGet Package : DevExpress.Win

Declaration

csharp
[DefaultValue(NavBarDragDrop.Default)]
[XtraSerializableProperty]
public virtual NavBarDragDrop DragDropFlags { get; set; }
vb
<DefaultValue(NavBarDragDrop.Default)>
<XtraSerializableProperty>
Public Overridable Property DragDropFlags As NavBarDragDrop

Property Value

TypeDefaultDescription
NavBarDragDropDefault

A set of NavBarDragDrop enumeration values specifying a link’s drag-and-drop options.

|

Available values:

NameDescription
None

If active, disables all other options. Drag-and-drop operations are prohibited for a control/group in such a case.

| | Default |

If active for a NavBarControl control, enables the AllowDrag and AllowDrop options and disables all others. If active for a group, the group inherits the control’s set of drag-and-drop options.

| | AllowDrag |

If active for a NavBarControl control, its links are allowed to be dragged. If active for a group, a user can drag items of this group.

| | AllowDrop |

If active for a NavBarControl control, links of this control can be dropped onto it. If active for a group, links of the control can be dropped onto this group. Links of other controls cannot be dropped unless the AllowOuterDrop option is active.

| | AllowOuterDrop |

If active for a NavBarControl control, links of other NavBarControl controls can be dropped onto the control. If active for a group, links of other controls can be dropped onto this group. Use the AllowDrop option to specify whether links of this control can be dropped onto the control/group.

|

Remarks

Use the DragDropFlags property to control the group’s behavior as it relates to link drag and drop operations. It allows you to enable or disable automatic link dragging & dropping and dropping them from other NavBarControls.

Note that if the NavBarDragDrop.Default option is enabled, the group uses the drag and drop settings specified by the control’s NavBarControl.DragDropFlags property. The NavBarGroup.GetDragDropFlags method returns the actual drag and drop settings for the group

Example

The following sample code adjusts drag & drop options of the first group within the control. It enables dragging of this group’s links and disables dropping links from other controls into this group. The NavBarGroup.DragDropFlags property is used for this purpose.

csharp
using DevExpress.XtraNavBar;
// ...
navBarControl1.Groups[0].DragDropFlags &= ~NavBarDragDrop.AllowOuterDrop;
navBarControl1.Groups[0].DragDropFlags |= NavBarDragDrop.AllowDrag;
vb
Imports DevExpress.XtraNavBar
'...
With NavBarControl1.Groups(0)
   .DragDropFlags = .DragDropFlags And Not NavBarDragDrop.AllowOuterDrop
   .DragDropFlags = .DragDropFlags Or NavBarDragDrop.AllowDrag
End With

See Also

NavBarDragDrop

DragDropFlags

NavBarGroup Class

NavBarGroup Members

DevExpress.XtraNavBar Namespace