JAX
JAX

Reputation: 1620

Navigate with object

According to this MSDN Article, the NavigationServe.Navigate methods must have an overload to accept an object as augment, In Visual Studio 2013, and having .Net 4.5.1 installed, the IDE can't find the overload and it forces me to use a URI. Is there anything wrong with my Visual Studio or it has been discontinued, etc.

this.NavigationService.Navigate(new ShowRoom("", ""));
// The best overload for navigation..... has some invalid arguments 

Upvotes: 1

Views: 73

Answers (1)

siger
siger

Reputation: 3162

Notice how the version selector on the MSDN article you pointed to is set to .NET Framework 4.5. This overload does not apply to Windows Phone 8 (for which the version would be Silverlight).

Here is the NavigationService API definition for Windows Phone 8: http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice(v=vs.95).aspx

You will see that there is only one Navigate definition, taking in a Uri. You would use it like this:

this.NavigationService.Navigate("/ShowRoom.xaml?parameter1=value1");

Upvotes: 2

Related Questions