This is a migrated thread and some comments may be shown as answers.

Theme Resources

2 Answers 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Iron
Sergey asked on 21 Dec 2011, 06:32 PM
Can I use (and how) Theme Resources?
Let's say I want to draw the line with theme related color.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dani
Telerik team
answered on 22 Dec 2011, 03:03 PM
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 >>
0
Dani
Telerik team
answered on 27 Dec 2011, 02:17 PM
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 >>
Tags
General Discussions
Asked by
Sergey
Top achievements
Rank 1
Iron
Answers by
Dani
Telerik team
Share this question
or