Skip to main content

LayoutControl.AllowNewItemsDuringCustomization Property

Gets or sets whether an end-user can add new items (e.g. groups) in Customization Mode.

Namespace: DevExpress.Xpf.LayoutControl

Assembly: DevExpress.Xpf.LayoutControl.v24.1.dll

NuGet Package: DevExpress.Wpf.LayoutControl

Declaration

public bool AllowNewItemsDuringCustomization { get; set; }

Property Value

Type Description
Boolean

true if an end-user can add new items (e.g. groups) in Customization mode; otherwise, false.

Remarks

If the AllowNewItemsDuringCustomization property is set to true, an end-user can add new items (e.g. groups) in Customization Mode. To enable this feature, the LayoutControl.AllowAvailableItemsDuringCustomization property must also be set to true.

You can customize properties of newly created items by handling the LayoutControl.InitNewElement event.

To add new groups via the Available Items list, do the following:

  1. Hover over a button at the Layout Control’s top left corner:

    DXLayoutControl_NewGroup_1_HoverOverButton

    This invokes the Available Items list:

    DXLayoutControl_NewGroup_2_OpenAvailableItemsList

  2. Drag-and-drop “New Group Box” or “New Tabbed Group” items to the layout.

    The “New Group Box” item creates a new LayoutGroup object whose LayoutGroup.View property is set to LayoutGroupView.GroupBox.

    The “New Tabbed Group” item creates a new LayoutGroup object whose LayoutGroup.View property is set to LayoutGroupView.Tabs. The created group contains two tabs.

If the AllowNewItemsDuringCustomization and LayoutControl.AllowAvailableItemsDuringCustomization properties are enabled, it’s possible to add new tabs to a tabbed group as follows:

  1. Select a tabbed group to show a context window with customization buttons.
  2. Click the ‘+’ customization button:

    DXLayoutControl_NewTab_1_SelectTabbedGroup

    This adds a new LayoutGroup as a child of the tabbed group.

After groups are created, you can move layout items to the groups, using drag-and-drop.

See Also