Silverlight应用程序开发:核心事件、参数传递与自定义启动界面
1. 应用程序核心事件概述
在Silverlight应用程序中, Application 类提供了几个核心事件,包括 Startup 、 UnhandledException 和 Exit 。除此之外,还有 InstallStateChanged 和 CheckAndDownloadUpdateCompleted 这两个事件,主要用于浏览器外应用程序。
在Visual Studio中, App.xaml.cs 文件的应用程序构造函数包含预生成的代码,用于为这三个核心事件附加事件处理程序:
public App()
{
this.Startup += this.Application_Startup;
this.Exit += this.Application_Exit;
this.UnhandledException += this.Application_UnhandledException;
InitializeComponent();
}
附加应用程序事件处理程序有两种方式:一种是使用代码,如上述示例;另一种是在XAML标记中添加事件属性,示例如下:
<Application ...
超级会员免费看
订阅专栏 解锁全文
82

被折叠的 条评论
为什么被折叠?



