NavBarGroupControlContainer Class

Represents the container displayed within a NavBar group when this group's NavBarGroup.GroupStyle property is set to NavBarGroupStyle.ControlContainer.

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v20.1.dll

Declaration

public class NavBarGroupControlContainer :
    XtraScrollableControl,
    ITransparentBackgroundManager,
    ITransparentBackgroundManagerEx
Public Class NavBarGroupControlContainer
    Inherits XtraScrollableControl
    Implements ITransparentBackgroundManager,
               ITransparentBackgroundManagerEx

Related API Members

The following members accept/return NavBarGroupControlContainer objects:

Remarks

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.

NOTE

Before accessing and customizing the NavBarGroupControlContainer, ensure that the group has been added to the NavBarControl.Groups collection.

NOTE

Switching the NavBarGroup.GroupStyle property from NavBarGroupStyle.ControlContainer to another value destroys the control container and all the controls owned by the container.

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.

GroupStyle_ControlContainer_TreeList

Examples

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.

embedding_datecontrol_into_a_group

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;
See Also