Skip to main content

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.v24.2.dll

Declaration

[DefaultValue(NavBarDragDrop.Default)]
[XtraSerializableProperty]
public virtual NavBarDragDrop DragDropFlags { get; set; }

Property Value

Type Default Description
NavBarDragDrop Default

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

Available values:

Name Description
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.

using DevExpress.XtraNavBar;
// ...
navBarControl1.Groups[0].DragDropFlags &= ~NavBarDragDrop.AllowOuterDrop;
navBarControl1.Groups[0].DragDropFlags |= NavBarDragDrop.AllowDrag;
See Also