Question

I have created a page class in the windows phone class library and I referenced that dll in windows phone app project(WP8).

Now how do i navigate to the page class created in the library..How do i specify the uri? The exact API and syntax would help please.

I have tried using the this.frame.Navigate(typeof(pagename)) as well as the NavigationService.Navigate(new uri("/pagename.xaml",UriKind.relative))..Both of the above are not working..I am assuming there is a mistake in the path specified in the uri..

Was it helpful?

Solution

The following did work for me correctly.

    NavigationService.Navigate(new Uri("/AssemblyName;component/MyPage.xaml", UriKind.Relative));

or to generalize the Uri , its format should be : /{assemblyName};component/{pathToResource}

Just be sure you don't have dot"." in your assembly name as it may result in some uri format exception.

Hope this works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top