How to redirect to a page that exists in a particular project, to another page in another project in the same solution?

I have a solution for Windows Phone; which contain two C # projects. I have a button in one on the pages of the first project; which we redirect the user to another page in the second solution. How to redirect to a page that exists in a particular project, to another page in another project in the same solution? since we use the following code to redirect between pages in the same project.

NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); 
0
source share
1 answer

If you are linking to another project, you can use the following method:

 NavigationService.Navigate(new Uri("/YourOtherProjectName;component/TargetPage.xaml", UriKind.Relative)); 

EDIT: If anyone is interested, I put the sample project on Github: https://github.com/tpetrina/blogcode/tree/master/BlogResearch . The WP7 application project is called NavigateToLibraryPage , and it contains a single button that navigates to a page in the specified class library named wp7.library

0
source

Source: https://habr.com/ru/post/1489729/


All Articles