简体   繁体   中英

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. The first project is a panaroma project, and second one is a normal project (both for windows phone).

For the panaroma project I have added an applciation bar and some items. 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:

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 . 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM