How to redirect to a page which exists in specif project to another page in other project in the same solution?

后端 未结 1 1274
鱼传尺愫
鱼传尺愫 2021-01-28 09:38

I have windows phone solution ; which contain two c# projects. I have a button in one in the pages in the first project ; which we redirect the user to another page in the secon

相关标签:
1条回答
  • 2021-01-28 10:18

    If you are referencing the other project, you can use the following method:

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

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

    0 讨论(0)
提交回复
热议问题