Related API Members
The following members accept/return NavBarGroupControlContainer objects:
A NavBarControl allows any controls to be displayed within NavBar groups. To do this, set the group's NavBarGroup.GroupStyle property to NavBarGroupStyle.ControlContainer. This automatically creates a NavBarGroupControlContainer control and displays it within the specified group. Then you can place any controls onto the container and these will be displayed when the group is expanded.
To get the group's control container, use the NavBarGroup.ControlContainer property. This property returns a valid value (not null) only when the NavBarGroup.GroupStyle property is set to NavBarGroupStyle.ControlContainer. In other cases, the group's control container does not exist and the NavBarGroup.ControlContainer property returns null.
Before accessing and customizing the NavBarGroupControlContainer, ensure that the group has been added to the NavBarControl.Groups collection.
The control container fills the entire group's region. The visible height of the control container can be specified via the NavBarGroup.GroupClientHeight property.
The following image shows a NavBar group displaying a Tree List control. The Tree List is placed onto the group's control container.
The following sample code embeds a DateControl into a NavBarControl's group. To allow control embedding, the NavBarGroup.GroupStyle property is set to ControlContainer. Then, the DateControl is added to the group via the NavBarGroup.ControlContainer property.
The image below shows the result.
DevExpress.XtraEditors.DateControl dc = new DevExpress.XtraEditors.DateControl(); navBarGroup1.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer; navBarGroup1.ControlContainer.Controls.Add(dc); navBarGroup1.GroupClientHeight = dc.Height + 3; navBarControl1.Width = dc.Width + 3;