简体   繁体   English

在Windows Phone解决方案中在主项目中启动另一个项目

[英]Starting another project within main project in a solution for windows phone

I dont know if this is the right approach or not. 我不知道这是否是正确的方法。 But I have created an empty solution in VS2010 and I have added 2 projects to this solution. 但是我在VS2010中创建了一个空解决方案,并且向该解决方案添加了2个项目。 The first project is a panaroma project, and second one is a normal project (both for windows phone). 第一个项目是Panaroma项目,第二个项目是正常项目(均适用于Windows Phone)。

For the panaroma project I have added an applciation bar and some items. 对于panaroma项目,我添加了一个应用栏和一些项目。 One of these items is called option and I want to open the second project so the user can set/change some options. 这些项目之一称为选项,我想打开第二个项目,以便用户可以设置/更改一些选项。

How does one calls another project withing the main project? 如何与主项目一起调用另一个项目?

    private void Options_Click(object sender, EventArgs e)
    {
        //Start the project which is called Options
    }

If what you want is just reuse run some code of your second project but in the context of ProjectA (basically as a library), you can just do AddReference in ProjectA to add a reference to project B and use the follwing line to navigate to a page defined in projectB: 如果您想要的只是重用,请运行第二个项目的一些代码,但要在ProjectA的上下文中(基本上是作为一个库),您可以在ProjectA中执行AddReference来添加对项目B的引用,并使用下面的代码行导航到在projectB中定义的页面:

NavigationService.Navigate(new Uri("/ProjectB;component/SettingsPage.xaml", UriKind.Relative));

If what you want is to start ProjectB as an external application than in windows phone 8 you can use Uri association . 如果要在Windows Phone 8中将ProjectB作为外部应用程序启动,则可以使用Uri关联 Please note this is available only for windows phone 8 and whichever data are saved in application ProjectB will not be accessible from ProjectA since windows phone application are sandbox. 请注意,这仅适用于Windows Phone 8,因为Windows Phone应用程序是沙箱,所以无法从ProjectA访问保存在应用程序ProjectB中的任何数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在调试模式下在解决方案中启动另一个项目 - Starting another project in the solution in Debug mode 将Windows 8.1项目添加到带有Windows Phone 8.1项目的解决方案中 - Add Windows 8.1 project to Solution with Windows Phone 8.1 project 如何在同一解决方案中执行另一个项目? - How to execute another project within the same solution? 如何在主项目窗口中最小化其他项目窗口? - How to Minimize other project windows within the main Project Window? VS2019 在解决方案中复制项目以用作新项目的起点 - VS2019 copy project within solution to use as starting point for new project 如何使用Windows Phone SDK 7.8打开现有的Windows Phone 8项目解决方案? - How to open existing Windows Phone 8 project solution with Windows Phone SDK 7.8? VS2010:使用解决方案中另一个项目的命名空间? - VS2010: Use namespace from another project within the solution? Visual Studio - Intellisense 无法识别同一解决方案中另一个项目中的命名空间 - Visual Studio - Intellisense not recognizing namespace in another project within same solution 将用户控件从一个项目复制到同一解决方案中的另一个项目 - Copy User Control from one project to another within same solution Windows Phone 7 XNA项目 - 更新到Windows Phone 8? - Windows Phone 7 XNA Project - Update to Windows Phone 8?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM