Method OnNavigatedToAsync
OnNavigatedToAsync(INavigator, NavigationArgs)
Invoked when the view model is navigated to.
Declaration
public virtual ValueTask OnNavigatedToAsync(INavigator navigator, NavigationArgs args)
Parameters
Type | Name | Description |
---|---|---|
INavigator | navigator | |
NavigationArgs | args |
Returns
Type | Description |
---|---|
ValueTask |
Implements
Remarks
All view models in the route have this method called on each navigation, even if they are already navigated to (see AlreadyNavigatedTo for more information).
This method can show dialogs as long as HasNestedNavigation on args
is false or the
dialogs are closed before the task completes. This method can cancel the current navigation and reroute to another destination by calling a navigation
method on the INavigator before the task completes, in which case it should stop any further processing and complete its task.