EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

WinJS.UI.BackButton object

Applies to Windows only

A dedicated button that enables traversal backward through the navigation stack history.

Each page can host a back button that remains hidden until you navigate to that page from another, whereupon the back button becomes visible on the page.

The BackButton checks the navigation stack to determine whether the user can navigate backwards. If there is nothing to navigate back to, the button is not displayed. When the user clicks the button or uses keyboard shortcuts (such as Alt+Left or the browserBack keys), the back function is called and the previous page in the navigation stack is loaded. You don't have to write any code.

Explore this functionality in more depth as part of our App features, start to finish series:  Flat navigation, start to finish (HTML) and Hierarchical navigation, start to finish (HTML)

Syntax


<button 
    data-win-control="WinJS.UI.BackButton">
</button>


var object = new WinJS.UI.BackButton();

Members

The BackButton object has these types of members:

Constructors

The BackButton object has these constructors.

ConstructorDescription
BackButton

Creates a new BackButton.

 

Methods

The BackButton object has these methods.

MethodDescription
addEventListener

Registers an event handler for the specified event.

dispatchEvent

Raises an event of the specified type and with additional properties.

dispose

Releases resources held by this BackButton. Call this method when the BackButton is no longer needed. After calling this method, the BackButton becomes unusable.

refresh

Checks the navigation history and updates the disabled attribute value of the control.

removeEventListener

Removes an event handler registered through the addEventListener method.

 

Properties

The BackButton object has these properties.

PropertyAccess typeDescription

element

Read/write

Gets the DOM element that hosts the BackButton.

 

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

WinJS.UI

Library

Ui.js

See also

WinJS.UI Namespace
AppBar
AppBarCommand
AppBarIcon
NavBar
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
Designers
Command patterns
Navigation patterns
Guidelines for app bars
Bottom app bar
Top app bar

 

 

Anzeigen:
© 2014 Microsoft