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 6553661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:36:31+00:00 2026-05-25T12:36:31+00:00

I have a control library that consists of only UserControl derived controls. I am

  • 0

I have a control library that consists of only UserControl derived controls. I am using a third party created assembly to ‘skin’ my controls. In a regular WPF application project all i need to do is merge a resource dictionary from the assembly in Application.xaml:

<Application x:Class="Application"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary Source="/ThirdPartyAssembly;component/SomeSkin.xaml" />
    </Application.Resources>
</Application>

I have tried acheiving the same affect by adding the resource dictionary to Generica.xaml in my control library:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ThirdPartyAssembly;component/SomeSkin.xaml" />
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

But that doesn’t work. From what I have been reading it seems this approach only works with controls that derive from Control?

I have tried/checked the following:

  1. I have this assembly attribute: <Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
  2. My Generic.xaml file is in the /Themes folder
  3. I have tried overiding the DefaultStyleKey in the static constructor – but this just blanks everything out (probably because I do not have styles created for each specific control)

Is there away for me to skin my controls without having to add the resource dictionary to every single control in my library?

At the end of the day I am hosting my WPF user controls in a WinForms application – so i am not able to use the obvious approach of setting the skin in Application.xaml as I would if I were using the controls from a WPF application.

  • 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-25T12:36:31+00:00Added an answer on May 25, 2026 at 12:36 pm
    1. Make sure that Generic.xaml is correctly referred in the Resources section of the topmost UserControl you have hosted in your windows form.

    2. I personally think that themes apply to anything that derives from Control, so also UserControl (as UserControl itself derives from Control).

    3. I have tested steps 1 and 2 above and my user control applied the thems corerctly when hosted in my windows form.

    Having said that, I have not tried applying any Third party tool (external assembly) based Theme. So that is something I am not sure about….

    Will let you know if I can get infragistics (3rd party) themes applied to my user control in a WindowsFormsHost. But the key is that the topmost UserControl in your WindowsFormsHost must refer the theme in it.

    Do share your thoughts if tips above do not work.

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

Sidebar

Related Questions

I have a Winform App that uses a 3rd Party Library of Controls, DevExpress.
I have created a custom control that is included in a control library that
I have a class library that I created using the Class Library project template.
Ok, situation: I am using a library that I have no control over, which
I have a prism app where I've added a third party WPF control library
I am using a third party library that mandates an iframe with some id,
I have a custom control library that I am using and I have added
When using the ajax library to create an Ajax Client Control, I have always
I have a library that draw on to given HDC using GDI+ apis. I
I have an user control in our library that I need to inherit and

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.