NavBarControl.DragDropFlags Property

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

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v21.2.dll

Declaration

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

Property Value

Type Default Description
NavBarDragDrop

AllowDrag | AllowDrop

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 NavBarControl‘s behavior as it relates to link drag and drop operations. It allows you to enable or disable automatic link drag and drop actions and dropping them from other NavBarControl controls.

Each group can override the control’s settings concerning links drag and drop. Use the NavBarGroup.DragDropFlags property for this purpose. The desired NavBarGroup object can be obtained via the NavBarControl.Groups property.

Note that the NavBarDragDrop.Default option implies that the NavBarDragDrop.AllowDrag and NavBarDragDrop.AllowDrop options are enabled while other options are disabled. The NavBarControl.GetDragDropFlags method returns the corrected NavBarControl.DragDropFlags property value.

Example

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.

using DevExpress.XtraNavBar;
// ...
navBarControl1.DragDropFlags &= ~NavBarDragDrop.AllowDrop;
navBarControl1.DragDropFlags |= NavBarDragDrop.AllowOuterDrop;
See Also