SystemNavigationManager SystemNavigationManager SystemNavigationManager SystemNavigationManager SystemNavigationManager Class

Definition

Provides a way for an app to respond to system provided back-navigation events.

public : sealed class SystemNavigationManager : ISystemNavigationManager, ISystemNavigationManager2
struct winrt::Windows::UI::Core::SystemNavigationManager : ISystemNavigationManager, ISystemNavigationManager2
public sealed class SystemNavigationManager : ISystemNavigationManager, ISystemNavigationManager2
Public NotInheritable Class SystemNavigationManager Implements ISystemNavigationManager, ISystemNavigationManager2
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The SystemNavigationManager lets you respond to user presses of the system provided back button such as a hardware button, or gestures and voice commands that activate the same event.

To enable your app to respond to the system back-navigation event, call GetForCurrentView to get the SystemNavigationManager object associated with the current view, then register an event handler for the BackRequested event. Your app will receive the event only of it's the foreground app. If you handle the BackRequested event, set the BackRequestedEventArgs.Handled property to true to mark the event as handled. If you don't mark the event as handled, the system decides whether to navigate away from the app (on the Mobile device family) or ignore the event (on the Desktop device family).

If the device doesn't provide any back-navigation button, gesture, or command, the event is not raised.

Properties

AppViewBackButtonVisibility AppViewBackButtonVisibility AppViewBackButtonVisibility AppViewBackButtonVisibility AppViewBackButtonVisibility

Gets or sets a value that indicates whether a back button is shown in the system UI.

Methods

GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView()

Returns the SystemNavigationManager object associated with the current window.

Events

BackRequested BackRequested BackRequested BackRequested BackRequested

Occurs when the user invokes the system provided button, gesture, or voice command for back-navigation.

See Also