Skip to main content

NavButton.IsMain Property

Gets or sets whether the current NavButton is the Main Button from which navigation starts.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(false)]
[DXCategory("Properties")]
public bool IsMain { get; set; }

Property Value

Type Default Description
Boolean false

true if the current NavButton is the Main Button; otherwise, false.

Remarks

The Main Button is displayed in the nav bar. A tap/click on the Main Button displays the primary drop-down tile bar displaying tiles corresponding to root level navigation elements.

When a TileNavPane is created at design time by dropping it on a form from the Toolbox, the Main Button is created automatically and displayed at the leftmost position in the nav bar. Use the NavElement.Alignment property to specify the alignment of the Main Button relative to the nav bar.

When you create a TileNavPane control in code, the Main Button needs to be created in code as well. To do this, create a NavButton object, add it to the TileNavPane.Buttons collection and set this button’s IsMain property to true.

The root navigation elements displayed on clicking the Main Button can either be categories (stored the TileNavPane.Categories collection) or items of the default category (see TileNavPane.DefaultCategory). The type of content displayed on the Main Button tap/click can be specified with the TileNavPane.MainButtonBehavior property.

See Also