How to use the Lightweight Templates in RadGridView

2 posts, 0 answers
  1. Nasir
    Nasir avatar
    4 posts
    Member since:
    Sep 2013

    Posted 12 Dec 2013 Link to this post

    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
  2. Vera
    Admin
    Vera avatar
    263 posts

    Posted 13 Dec 2013 Link to this post

    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 >>
  3. DevCraft banner
Back to Top