views:

194

answers:

1

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

+1  A: 

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

Henrik Söderlund
Thanks Henrik. The weird thing is a month ago I wrote a comment saying that the application_start() was called on each module. I remember setting breaking points on each one to see the InitParams dictionary passed. Ah well, I will look at resource dictionaries. Thanks.
JD