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

How to use the Lightweight Templates in RadGridView

1 Answer 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nasir
Top achievements
Rank 1
Nasir asked on 12 Dec 2013, 05:43 PM
Hi,

I want to use the Lightweight Templates for GridViewRow and GridViewCell but I can't get it to work. The guide provided online seems to expect importing the .xaml files for the assemblies e.g. RadGridView.

In our project we only have the dlls referenced and I am not sure how to enable Lightweight Templates in that case. If I do import the .xaml files it throws a lot of exceptions complaining about duplicates, I would really appreciate a sample project to demonstrate this.

Regards,

Nasir

1 Answer, 1 is accepted

Sort by
0
Vera
Telerik team
answered on 13 Dec 2013, 11:39 AM
Hi Nasir,

Instead of copying all the xaml files in your project, you can just merge them directly from the theme assembly. For example, if you are using Windows8 theme, you should add a reference to the Telerik.Windows.Themes.Windows8.dll and then merge the needed xaml files like so:

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


Attached you can find a sample project.

Regards,
Vera
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Nasir
Top achievements
Rank 1
Answers by
Vera
Telerik team
Share this question
or