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

  • Home
  • SEARCH
  • 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 3786332
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:40:00+00:00 2026-05-19T11:40:00+00:00

In a Silverlight application we can define resources in the App.xaml and have access

  • 0

In a Silverlight application we can define resources in the App.xaml and have access to them from any XAML document, without having to explicitly merge those resources.

Is there an equivalent solution for a class library?
I created a separate resource dictionary in the class library, but I have to merge it as follows before I can use it.

<UserControl.Resources>
 <ResourceDictionary>
  <ResourceDictionary.MergedDictionaries>
   <ResourceDictionary Source="MyResources.xaml" />
  </ResourceDictionary.MergedDictionaries>
 </ResourceDictionary>
</UserControl.Resources>

Is there a way to avoid this? It’s rather tedious to do this in every XAML documents for globally used resources.

  • 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-19T11:40:00+00:00Added an answer on May 19, 2026 at 11:40 am

    I was about to ask this same question. Unfortunately, what you’ve described is pretty close to what I’ve been able to come up with. In theory, it seems like you should be able to put these into the library’s themes\generic.xaml file, but I haven’t been able to make that work — possibly I’m just doing something boneheaded. The best I’ve been able to do is just a slightly shorter variant of what you’re doing, namely, to leave out the MergedDictionaries syntax:

    <UserControl.Resources>
        <commonui:CommonStringsPublic x:Key="commonStrings" />
        <ResourceDictionary Source="/Alanta.Client.UI.Common;component/CommonResources.xaml" x:Key="commonResources" />
    </UserControl.Resources>
    

    I’d love to have someone point me to a better solution :-).

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

Sidebar

Related Questions

I have a Silverlight application that is built from a set of Silverlight class
In my Silverlight application, I can't seem to bring focus to a TextBox control.
I'm building a Silverlight application and one of my caveats from last time was
I have a Silverlight application that communications with an ASP.NET backend through WCF. I
I have a Silverlight application in which I would like to call a WCF
I have a Silverlight application which has on it a Canvas. On that Canvas,
I have built a Flex application that composes image resources, color layers, blurs etc
I have a Silverlight application that consists of a MainWindow and several classes which
HI, What is the best practice for localization of application in silverlight. I have
I have a silverlight user control which is bound to a Document object. the

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.