Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
410
Creating a ThemePack
posted

I've followed the guide "Creating a ThemePack" to create a WPF themepack. However, I also want to include styles for some .NET WPF controls in my themepack. How can I define the myStyleGroup_ResourceSets class as it's not derived from either DataPresenterResourceSet<DataPresenter.Locator>, EditorsResourceSet<Editors.Locator>  or  PrimitivesResourceSet<Primitives.Locator>?

Thank you!

Parents
  • 34510
    Verified Answer
    Offline posted

    Hi Jack,

    Please find attached a sample that demonstrates how to add styles for any controls you want to add to the theme pack.  You need to provide your own ResourceSet for the style group you want to add this way the application knows where to look for your styles.  In my sample I created a ResourceSet called Microsoft that I would use for all MS controls.  This resource set provides the means for locating the xaml file containing the my styles and providing it to the application.  In order to create this resource set I needed to create a class that derived from ResourceSet<> and implement it.  All this can be seen in my sample.

    Let me know if you have any questions.

    TestThemePack.zip
Reply Children
No Data