I have a prism application and various modules. I am wondering where is the best place to locate resources such as styles, brush, controltemplates, datatemplates?
Should
Application-wide resources I usually put in a ResourceDictionary
, which is added to either App.xaml
or StartupWindow.xaml
Resources for a specific View are usually located with the View. For example, a UserControl that is being used for a CalendarView will contain any custom resources for the Calendar, such as calendar-specific brushes, styles, templates, etc.
I usually don't see a reason to make module-wide resources, but if I ever do I'd have a ResourceDictionary
for the Module which can be loaded into the app's merged dictionaries at runtime, or included in individual Views in the Module.