Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6970343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:41:53+00:00 2026-05-27T16:41:53+00:00

I have a prism application and various modules. I am wondering where is the

  • 0

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 I make one single resource dictionary and put everything there? Should each module have their own resources? Or each view? I would like to follow the Prism goal of keeping everything modular, but also I dont see the point in re-declaring the same resources in every module…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:41:54+00:00Added an answer on May 27, 2026 at 4:41 pm

    I develop application with Prism, and I use technique very close to described in Prism’s manual. There is YourApplication.Infrastructure project, where you usually place all your shared interfaces etc. So:

    1. I just add project YourApplication.Resources
    2. Create there folder Themes
    3. Create separate xaml file in Themes folder for each group of resources (like Generic.WPF.xaml for standard WPF controls’ styles, Generic.Brushes.xaml for brushes etc.)
    4. Create file Themes\Generic.xaml (exactly with this name, it will add huge benefits in the future) with content like

      <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
      
          <ResourceDictionary.MergedDictionaries>
      
              <ResourceDictionary Source="Generic.Brushes.xaml"/>
              <ResourceDictionary Source="Generic.WPF.xaml"/>
      
          </ResourceDictionary.MergedDictionaries>
      
      </ResourceDictionary>
      
    5. Now you can add those resources in any module (you have separate project for it, right?) by adding reference to YourApplication.Resources to that project and adding to your view’s xaml:

      <UserControl.Resources>
          <ResourceDictionary>
      
              <ResourceDictionary.MergedDictionaries>
                  <ResourceDictionary Source="pack://application:,,,/YourApplication.Resources;component/Themes/Generic.xaml"/>
              </ResourceDictionary.MergedDictionaries>
      
              <!-- Put your not shared resource here -->
      
          </ResourceDictionary>
      </UserControl.Resources>
      

    I don’t know, maybe this way has some problems, but it works, and works well for me. If anybody can comment somehow this way (pros/cons) – I will be very happy to hear it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Main WPF application and other modules and I am using PRISM
This relates to Composite Application Guidance for WPF, or Prism. I have one MainRegion
The scenario: I have a PRISM application developed in Silverlight (4), and I'm using
In silverlight prism application I have a region (ContentControl) and would like to remove
I have an Prism application that begins with a Splash screen, then needs to
I have a module in a Prism application and in its initialize method I
I have a class in my Prism/CAL application which generates a form for users
I'm in the beginning stages of designing an application using Prism and have a
I have a WPF MVVM prism application to upload files. I filled a datagrid
we have developed an intranet application with Silverlight 4 using MVVM with PRISM. Up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.