Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Hide a NavBar's Item

The following sample code hides the item which corresponds to the second link of the second group. Note that if an item is hidden, all corresponding links become invisible.

The example below displays a NavBarControl control before and after sample code execution. Note that hiding an item results in hiding two links.

Items - Visible

using DevExpress.XtraNavBar;
// ...
NavBarGroup group = navBarControl1.Groups[1];
NavBarItem item = group.ItemLinks[1].Item;
item.Visible = false;