Skip to main content
A newer version of this page is available. .
Tab

ASPxNavBar.ShowExpandButtons Property

Gets or sets a value that specifies whether group expand buttons are displayed within the NavBar’s group headers.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

[DefaultValue(true)]
public bool ShowExpandButtons { get; set; }

Property Value

Type Default Description
Boolean **true**

true if group expand buttons are displayed; otherwise, false.

Remarks

Use the ShowExpandButtons property to control the visibility of group expand buttons within the headers of the navbar’s groups.

You can manipulate the expand button visibility for individual groups by using a group’s NavBarGroup.ShowExpandButton property.

Example

using DevExpress.Web.ASPxNavBar;
...

protected void Page_Load(object sender, EventArgs e) {
     ASPxNavBar ASPxNavBar1 = new ASPxNavBar();
     ASPxNavBar1.AutoPostBack = true;
     ASPxNavBar1.ShowExpandButtons = false;
     ASPxNavBar1.GroupHeaderStyle.HorizontalAlign = HorizontalAlign.Left;
     ASPxNavBar1.ItemStyle.HorizontalAlign = HorizontalAlign.Center;

     NavBarGroup group1 = new NavBarGroup("Group1");
     NavBarGroup group2 = new NavBarGroup("Group2");

     NavBarItem item1 = new NavBarItem("Item1");
     NavBarItem item2 = new NavBarItem("Item2");
     NavBarItem item3 = new NavBarItem("Item3");

     ASPxNavBar1.Groups.Add(group1);
     ASPxNavBar1.Groups.Add(group2);

     group1.Items.Add(item1);
     group2.Items.Add(item2);
     group2.Items.Add(item3);

     group1.HeaderStyle.BackColor = System.Drawing.Color.White;
     group2.HeaderStyle.BackColor = System.Drawing.Color.Red;

     Page.Form.Controls.Add(ASPxNavBar1);       
}
See Also