Class RoutedViewModel<TParam>
Represents a view model that can be navigated to with a parameterized route.
Namespace: Singulink.UI.Navigation
Assembly: Singulink.UI.Navigation.dll
Syntax
public abstract class RoutedViewModel<TParam> : IRoutedViewModel<TParam>, IRoutedViewModelBase where TParam : notnull
Type Parameters
Name | Description |
---|---|
TParam | The type of the parameter, or a tuple in the case of multiple parameters. |
Properties
Name | Description |
---|---|
Parameter | Gets or sets the route parameter (or parameters tuple if there are multiple parameters) for this view model. This property is set once prior to any navigation events being called on the view model. Getting the value before it is set or setting it more than once will throw an InvalidOperationException. |
Methods
Name | Description |
---|---|
OnNavigatedFrom() | Invoked when the view model is navigated away from. |
OnNavigatedToAsync(INavigator, NavigationArgs) | Invoked when the view model is navigated to. |
OnNavigatingFromAsync(INavigator, NavigatingArgs) | Invoked when the view model is being navigated away from and allows the navigation to be cancelled. |