Method PinCurrentRoute
PinCurrentRoute()
Pins the current route so that its views and view models are retained (regardless of caching settings and whether the route remains in the navigation history) until the returned pin is disposed. Navigating to the pinned route again with NavigateAsync(NavigatorRoute) reuses them with their state intact, which is useful for temporarily leaving a view with unsaved state and returning to it later.
Declaration
public RoutePin PinCurrentRoute()
Returns
| Type | Description |
|---|---|
| RoutePin |
Implements
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The navigator does not have a current route. |