Silverlight初体验之设置启动页面

如题:在Silverlight中怎么设置启动页面,当新建一个Silverliht页面或项目中都会存在一个App.xaml页面,这个页面是Silverlight应用程序文件,派生于Application类,在一个Silverlight应用程序项目中,必须有一个该文件,它负责指定应用程序的启动页面,以及应用程序的其他设置,当Silverlight应用程序在浏览器中运行时,有Silverlight插件负责初始化该类。

1 private void Application_Startup(object sender, StartupEventArgs e)
2 {
3 this.RootVisual = new SilverlightControl1(); //Page();
4   }

在App.xaml.cs页面中的Application_Startup方法中设置RootVisual的值换成你想启动那个页面的对象就行了。

原文地址:https://www.cnblogs.com/timy/p/1844792.html