ToolboxControl.Groups Property
Provides access to the collection of the groups into which the ToolboxControl items are arranged.
Namespace: DevExpress.XtraToolbox
Assembly: DevExpress.XtraBars.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
[DXCategory("Data")]
[InheritableCollection]
public ToolboxGroupCollection Groups { get; }
#Property Value
Type | Description |
---|---|
DevExpress. |
A DevExpress. |
#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.
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.