Separate theme for one control

2 posts, 0 answers
  1. Heiko
    Heiko avatar
    124 posts
    Member since:
    Oct 2012

    Posted 21 Jul 2015 Link to this post

    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

  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 23 Jul 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top