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

Separate theme for one control

1 Answer 144 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Heiko
Top achievements
Rank 1
Iron
Veteran
Heiko asked on 21 Jul 2015, 09:27 AM

We are using implicit styles like this:

<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/>
    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
    ...
    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
    ...
    ...
</ResourceDictionary.MergedDictionaries>
  

Now we want just one control (GridView) to be displayed with another theme (Windows8). What is the most efficient and easiest way to display all GridViews in our application (and there are a lot of them) with the design of the Windows8-theme?

TIA
Neils

1 Answer, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 23 Jul 2015, 10:28 AM
Hello Neils,

In order to achieve this you can merge the Resource Dictionaries with the Windows8 theme in the configuration (Resources) of the control(RadGridView). Check the code snippet below:
<telerik:RadGridView>
    <telerik:RadGridView.Resources>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/System.Windows.xaml"/>
            ...
            <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
            ...
        </ResourceDictionary.MergedDictionaries>
    </telerik:RadGridView.Resources>
</telerik:RadGridView>

I hope it helps.


Regards,
Masha
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Heiko
Top achievements
Rank 1
Iron
Veteran
Answers by
Masha
Telerik team
Share this question
or