An app bar dedicated to navigation commands, typically located at the top of the display.
The NavBar object has these types of members:
The NavBar object has these constructors.
Creates a new NavBar.
The NavBar object has these events.
Occurs immediately after the NavBar is closed.
Occurs immediately after the NavBar is displayed.
Occurs before the NavBar is closed.
Occurs immediately before the NavBar is opened.
Occurs after the NavBar has finished processing its child elements.
The NavBar object has these methods.
Registers an event handler for the specified event.
Closes the NavBar. Replaces the hide method.
Raises an event of the specified type and with specified additional properties.
Releases resources held by this NavBar. Call this method when the NavBar is no longer needed. After calling this method, the NavBar becomes unusable.
Returns the NavBarCommand object identified by id.
Hides the specified commands of the NavBar.
Opens the NavBar if it is not disabled. Replaces the show method.
Removes an event handler registered through the addEventListener method.
Shows the specified commands in the NavBar.
Shows the specified commands in the NavBar while hiding all other commands.
The NavBar object has these properties.
ClosedDisplayMode gets or sets how the app bar is displayed when opened is true.
Gets or sets a value that indicates whether the NavBar is disabled.
Gets the HTML element that hosts this NavBar.
Gets a value that indicates whether the NavBar is not closed. (Replaces hidden property.)
Gets or sets a value that specifies whether the NavBar appears at the top or bottom of the main view.
NavBars should be direct children of document.body. Otherwise, it is possible to mask event detection on the NavBar due to stacking context effects. This is because event detection for other elements is blocked while the NavBar is open. So, if the NavBar is a child of one of those blocked elements, it too will be blocked. This behavior is typical for all overlaying controls.
Styles the entire NavBar.
Minimum WinJS version
- WinJS.UI Namespace
- Your first app - Part 3: PageControl objects and navigation
- Navigating between pages (HTML)
- Adding app bars
- Adding nav bars
- HTML AppBar control sample
- HTML NavBar control sample
- Navigation and navigation history sample
- Command patterns
- Navigation patterns
- Guidelines for app bars
- Bottom app bar
- Top app bar