Back to Devexpress

NavElement.Visible Property

windowsforms-devexpress-dot-xtranavbar-dot-navelement-38c7d905.md

latest1.9 KB
Original Source

NavElement.Visible Property

Gets or sets a value specifying the visibility of the element.

Namespace : DevExpress.XtraNavBar

Assembly : DevExpress.XtraNavBar.v25.2.dll

NuGet Package : DevExpress.Win

Declaration

csharp
[DefaultValue(true)]
[XtraSerializableProperty]
public bool Visible { get; set; }
vb
<DefaultValue(True)>
<XtraSerializableProperty>
Public Property Visible As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if the element is visible; otherwise false.

|

Example

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.

csharp
using DevExpress.XtraNavBar;
// ...
NavBarGroup group = navBarControl1.Groups[1];
NavBarItem item = group.ItemLinks[1].Item;
item.Visible = false;
vb
Imports DevExpress.XtraNavBar
' ...
Dim Group As NavBarGroup = NavBarControl1.Groups(1)
Dim Item As NavBarItem = Group.ItemLinks(1).Item
Item.Visible = False

See Also

NavElement Class

NavElement Members

DevExpress.XtraNavBar Namespace