如何在 Windows Phone 的一个解决方案中创建多个项目模板 [英] How to create multiple project template in one solution for windows phone

查看:27
本文介绍了如何在 Windows Phone 的一个解决方案中创建多个项目模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在普通的 wp7 应用程序中,只有一个项目.我尝试将另一个项目添加到现有解决方案中.但是,它无法运行.我认为可以将多个项目模板添加到现有解决方案中.但我只是不知道需要做什么或需要删除哪些文件.感谢您在这方面的帮助.

in the normal wp7 app, there is only one project. I try to add another project into an existing solution. however, it could not run. I think it is possible to add more than one project templates into existing solution. But I just dont know what need to be done or what files need to be deleted. woud appreciate your help on this.

----- 更新---

----- Update ---

  1. 创建两个项目;ProjMain 和 ProjChild

  1. Create two projects; ProjMain and ProjChild

在 projChild 中,添加一个新的 Page 并删除 App.xaml、MainPage.Xaml、AppManifest.xml、WMAppManifest.xml、ApplicationIcon.png、Background.png

In projChild, add a new Page and delete App.xaml, MainPage.Xaml,AppManifest.xml, WMAppManifest.xml, ApplicationIcon.png, Background.png

3 在 ProjMain 中,我将 ProjChild 添加到该 ProjMain 中.

3 In ProjMain, I add ProjChild into this ProjMain.

推荐答案

是的,我们可以将一个项目切换到另一个项目.我们需要添加该项目的引用.然后使用 NavigationService 之类的.

Yes we can switch one project to another. We have a need to add reference of that project. then use NavigationService like.

NavigationService.Navigate(new Uri("/AnotherProject;component/Page2.xaml", UriKind.Relative));

这里的另一个项目是我们想要使用新页面和页面名称的第二个项目.

here AnotherProject is second project from where we want to use new page and page name.

这篇关于如何在 Windows Phone 的一个解决方案中创建多个项目模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆