DotNetBar Galleries include automatic support for the Gallery Groups that are used to group the items contained inside of gallery together under group label when gallery is displayed on popup.
Here is how default gallery looks like when used on the RibbonBar:
Below is the Gallery with the same content but displayed on the popup. Note that buttons in same group appear together under group label.
Each button when added to the GalleryContainer receives the GalleryGroup extender property. For example you would see that in VS.NET Properties window when you select button inside of Gallery as: GalleryGroup on galleryContainer1.
To assign the button to a group, simply select desired group from the property drop-down
or select <Create new group> item from drop-down to create new group. You can expand the GalleryGroup property to change the group label by setting its Text property or change its display order by setting the DisplayOrder property. Note that you can use our text-markup as well. Sample above uses the <b>Stock</b> as value for the GalleryGroup property.
For an example on how to do this from code, take a look at the Office 2007 Galleries sample that is shipped with DotNetBar. InitializeComponent method will have complete code which shows how to do this.
Office 2007 Galleries sample included with DotNetBar shows this feature in action.