简体   繁体   English

如何在C#中的运行时在Windows Phone 7/8中创建和添加基本页面?

[英]How to create and add basic page in windows phone 7/8 in run-time in c#?

I am a new learner and i have searched this for a long time , that can we add different types of pages in run-time using c# in windows phone 7 or windows phone 8. 我是一名新手,我已经搜索了很长时间,可以在Windows Phone 7或Windows Phone 8中使用c#在运行时添加不同类型的页面。

As we manually define no of pages while creating an application by going to project and adding a page which finally gives us a .XAML page , but i want to achieve it using run-time not by manually adding . 当我们通过转到项目并添加一个页面来最终创建一个.XAML页面时,在创建应用程序时手动定义页面的数量,但是我想使用运行时来实现它,而不是手动添加。

Why would you want to do that? 你为什么想这么做?

Well you can just write 好吧,你可以写

 var page = new PhoneApplicationPage();

and do everything in C# of course. 并使用C#进行所有操作。

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

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