Skip to main content

ToolboxControl.Groups Property

Provides access to the collection of the groups into which the ToolboxControl items are arranged.

Namespace: DevExpress.XtraToolbox

Assembly: DevExpress.XtraBars.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Data")]
[InheritableCollection]
public ToolboxGroupCollection Groups { get; }

Property Value

Type Description
DevExpress.XtraToolbox.ToolboxGroupCollection

A DevExpress.XtraToolbox.ToolboxGroupCollection object that represents the collection of the ToolboxControl groups.

Remarks

The ToolboxControl arranges its items into groups. The ToolboxControl groups of items are represented by the ToolboxGroup objects. The Groups property provides access the collection of the ToolboxControl groups. At design time, you can add groups to the control using the smart tag, see the figure below.

ToolboxControl_Design_AddFirstGroup

In code, you can add a group or range of groups as shown in the code snippet below.

using DevExpress.XtraToolbox;

// Add a single group using the Add method.
toolboxControl1.Groups.Add(new ToolboxGroup("Group"));

// Add a range of groups using the AddRange method.
ToolboxGroup group1 = new ToolboxGroup("First Group");
ToolboxGroup group2 = new ToolboxGroup("Second Group");
toolboxControl1.Groups.AddRange(new ToolboxGroup[] { group1, group2 });

To add items to a particular group, use the ToolboxGroup.Items collection.

See Also