passing arguments with NavigationService.Navigate?

Jul 24, 2013 at 8:08 AM
Most examples use a null parameter when navigating to another view; however, I have seen args.Arguments passed. Are we able to use this parameter to pass objects between views? I've tried, but it seems the empty default constructor of the called view gets executed instead of the overloaded constructor... as if the arguments list or object is dropped.
Jul 24, 2013 at 5:08 PM

The navigation parameter can be used to pass simple information to the view you are navigating to. When you pass a parameter in the Navigate method, it will be received by the navigated view / view model in its OnNavigatedTo method, not in its constructor.

However, take into account that what you can pass as a navigation request is limited due to how the Frame class works. You can find more information about this in the following article of the knowledge base:

I hope this helps,

Damian Cherubini
Jul 25, 2013 at 9:06 PM
thanks Damian!