Theme Resources

3 posts, 1 answers
  1. Sergey
    Sergey avatar
    24 posts
    Member since:
    Oct 2011

    Posted 21 Dec 2011 Link to this post

    Can I use (and how) Theme Resources?
    Let's say I want to draw the line with theme related color.
  2. Answer
    Dani
    Admin
    Dani avatar
    848 posts

    Posted 22 Dec 2011 Link to this post

    Hello,

    You cannot reference resources from theme assemblies or from theme projects that are distributed with the installation.

    If you need to use a theme-specific brush, you will need to include / copy it as a resource in your own project and then use it on additional controls in your UI.

    Let me know if you need help.

    Regards,
    Dani
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. Dani
    Admin
    Dani avatar
    848 posts

    Posted 27 Dec 2011 Link to this post

    Hello Sergey,

    I would like to add a note to this discussion. You could include a theme project in your solution, since our Silverlight themes are located in separate external assemblies. You can then merge a resource dictionary for a particular control in App.xaml. For example:

    <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="/Metro;component/Themes/Metro/ComboBox.xaml" />
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>

    This will grant you access to theme specific brushes used in RadComboBox for Metro theme, for instance.

    However, this does not guarantee access to all theme-specific brushes. If you need to use a brush that is used in RadDocking but is not used in RadComboBox, for example, merging the ComboBox.xaml resource dictionary will not help.

    Hope this explanatory paragraph shed some light on resources reuse.

    All the best,
    Dani
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top