每个 silverlight 应用程序都会调用 application_startup() 吗?

发布于 2024-08-20 11:04:41 字数 209 浏览 1 评论 0原文

我正在使用 David Hill 的 prism 模板,每个应用程序模块都包含一个 App.xaml 文件。我确信加载的每个模块都会创建 App 对象(属性中的启动对象),然后调用 application_startup() 事件。

然而,这似乎并没有发生?这是正确的行为吗?如果是这样,我将如何在每个应用程序模块的 app.xaml 文件中定义我的资源(样式等)?

京东

I am using the templates for prism by David Hill and each application module contains a App.xaml file. I was sure that each module as it was loaded would create the App object (startup object in properties) and then call the application_startup() event.

However, this does not seem to be happening? Is this correct behaviour? If so, how would I define my resources (styles etc) in a app.xaml file for each application module?

JD

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

番薯 2024-08-27 11:04:41

我认为 app_start 事件仅适用于启动(或“主”)应用程序。因此,您可以将所有资源包含在该应用程序的 App.xaml 中。但它不一定是一个文件,您可以使用合并的资源字典将它们分开。您可以在这里找到更多相关信息:
http://www.silverlightshow.net/items/合并资源字典-in-Silverlight-3.aspx

I think it is only for the start-up (or "master" if you will) application that the app_start event is called. So you could include all your resources in App.xaml of that application. But it wouldn't necessarily have to be one single file, you can separate them using merged resource dictionaries. You'll find more info on that here:
http://www.silverlightshow.net/items/Merged-Resource-Dictionaries-in-Silverlight-3.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文