So I'm creating UWP app, and using method
Frame.Navigate(Type type)
to navigate through my views. But one of my pages requires passing an object with navigation, so i use this method
Frame.Navigate(Type type, object param)
and then I can get the parameter in the code-behind of page like this:
public object NavigationParameter { get; private set; }
protected override void OnNavigatedTo(NavigationEventArgs e)
{
NavigationParameter = e.Parameter;
}
That's great, but I'm using MVVM pattern, so I want to get this parameter on the VM of my page. How can I do that?
P.S.: Solution with zero code behind would be spectacular.