Update navigation.md
This commit is contained in:
Родитель
f4c6e39303
Коммит
619cfc18e2
|
@ -4,9 +4,9 @@
|
|||
|
||||
The `NavigationService` is in charge of handling the navigation between app pages.
|
||||
|
||||
`NavigationService` is a class consumed using IoC that uses the `NavigateTo` method to navigate between pages. It uses the page key as a parameter. These page keys are registered in the `PageService` constructor and correspond to the Page ViewModel `FullName`.
|
||||
`NavigationService` is a class consumed using IoC that uses the `NavigateTo` method to navigate between pages. It uses the page key as a parameter. These page keys are registered in the `PageService` constructor and correspond to the Page's ViewModel `FullName`.
|
||||
|
||||
All pages ViewModels can extend from `INavigationAware` interface to run code on navigation events.
|
||||
All ViewModels can implement the `INavigationAware` interface to execute code on navigation events.
|
||||
|
||||
```csharp
|
||||
public class MainViewModel : ObservableRecipient, INavigationAware
|
||||
|
@ -25,7 +25,7 @@ public class MainViewModel : ObservableRecipient, INavigationAware
|
|||
|
||||
## Navigation initialization
|
||||
|
||||
The `ActivateAsync` method in the `ActivationService` class tries to get a `ShellPage` from the `IoC`, if the shell is not registered in the `ConfigureServices` method from the `App` file the `App.MainWindow` content will be initialized as a new Frame.
|
||||
The `ActivateAsync` method in the `ActivationService` class tries to get a `ShellPage` from the `IoC` and set the content of the applications MainWindow (`App.MainWindow`) to the ShellPage. If the ShellPage is not registered in the `ConfigureServices` method from the `App.xaml.cs` file, the content of the MainWindow will be set to a new Frame.
|
||||
|
||||
Classes that extend from `ActivationHandler` can perform the first navigation in the App, if it doesn't happen, the `DefaultActivationHandler` navigates to the home page.
|
||||
|
||||
|
@ -33,7 +33,7 @@ Classes that extend from `ActivationHandler` can perform the first navigation in
|
|||
|
||||
### Navigation Pane
|
||||
|
||||
This project type adds a ShellPage that sets NavigationService frame to a frame within the NavigationView. The NavigationService will do future navigation in this frame.
|
||||
This project type adds a ShellPage that sets the NavigationService's frame to a frame within the NavigationView on the ShellPage. The NavigationService will do future navigation in this frame.
|
||||
|
||||
```xml
|
||||
<Page>
|
||||
|
|
Загрузка…
Ссылка в новой задаче