| NavigationHelper Class |
Namespace: foodez.Common
The NavigationHelper type exposes the following members.
| Name | Description | |
|---|---|---|
| NavigationHelper |
Initializes a new instance of the NavigationHelper class.
|
| Name | Description | |
|---|---|---|
| CanGoBack |
Virtual method used by the GoBackCommand property
to determine if the Frame can go back.
| |
| CanGoForward |
Virtual method used by the GoForwardCommand property
to determine if the Frame can go forward.
| |
| ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject.) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetAnimationBaseValue | Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.) | |
| GoBack |
Virtual method used by the GoBackCommand property
to invoke the GoBack method.
| |
| GoForward |
Virtual method used by the GoForwardCommand property
to invoke the GoForward method.
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| OnNavigatedFrom |
Invoked when this page will no longer be displayed in a Frame.
This method calls SaveState, where all page specific
navigation and process lifetime management logic should be placed.
| |
| OnNavigatedTo |
Invoked when this page is about to be displayed in a Frame.
This method calls LoadState, where all page specific
navigation and process lifetime management logic should be placed.
| |
| ReadLocalValue | Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.) | |
| SetValue | Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| Dispatcher | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject.) | |
| GoBackCommand | RelayCommand used to bind to the back Button's Command property
for navigating to the most recent item in back navigation history, if a Frame
manages its own navigation history.
The RelayCommand is set up to use the virtual method GoBack
as the Execute Action and CanGoBack for CanExecute.
| |
| GoForwardCommand | RelayCommand used for navigating to the most recent item in
the forward navigation history, if a Frame manages its own navigation history.
The RelayCommand is set up to use the virtual method GoForward
as the Execute Action and CanGoForward for CanExecute.
|
| Name | Description | |
|---|---|---|
| LoadState |
Register this event on the current page to populate the page
with content passed during navigation as well as any saved
state provided when recreating a page from a prior session.
| |
| SaveState |
Register this event on the current page to preserve
state associated with the current page in case the
application is suspended or the page is discarded from
the navigaqtion cache.
|
public MyPage() { this.InitializeComponent(); var navigationHelper = new NavigationHelper(this); this.navigationHelper.LoadState += navigationHelper_LoadState; this.navigationHelper.SaveState += navigationHelper_SaveState; } private async void navigationHelper_LoadState(object sender, LoadStateEventArgs e) { } private async void navigationHelper_SaveState(object sender, LoadStateEventArgs e) { }
protected override void OnNavigatedTo(NavigationEventArgs e) { navigationHelper.OnNavigatedTo(e); } protected override void OnNavigatedFrom(NavigationEventArgs e) { navigationHelper.OnNavigatedFrom(e); }