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

How to get themes working?

5 Answers 1192 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Morten Nilsen
Top achievements
Rank 1
Morten Nilsen asked on 01 Mar 2012, 03:13 PM
Hi, I have this old winforms application that I am updating.
I want the RadGridView I have just added to it to use a different theme than default, but whatever I do, nothing happens..

I tried setting the ThemeName on the grid to "TelerikMetro", I also tried;
ThemeResolutionService.ApplicationThemeName = "TelerikMetro";
That sounded like the right thing to do after googling a bit - didn't work either from Program.cs or main.cs (the form with the grid)

I just don't get it.. how the heck do you get themes to work?

I've added references to Telerik.WinControls, t.w.gridview, t.w.themes.telerikmetro,t.w.ui, t.w.ui.design, t.windows.controls, t.w.c.data, t.w.c.datavisualization, t.w.c.gridview

This is driving me off the edge at the moment :(

  // Regards, Morten

5 Answers, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 06 Mar 2012, 09:51 AM
Hi Morten,

Thank you for writing.

To use a theme, other than ControlDefault, you will need to make the following steps:

1. Find the theme in your toolbox and drop it on your form. This will automatically insert the needed references in your project.
2. Set the ThemeName property of the controls you would like use the theme. Alternatively, if you would like the theme to be applied to the whole application, you can use the ThemeResolutionService.ApplicationThemeName.

You will be able to find detailed information and screenshots on how to use our themes in the following article: http://www.telerik.com/help/winforms/themes-using-default-themes.html.

I hope my answer is helpful. Please let me know whether the issue persists.

Greetings,
Boryana
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Manesh
Top achievements
Rank 2
answered on 03 Jul 2012, 06:05 AM
Hey friends, this themes are driving me to edge, on the form load() the theme is not applied or i've added a RibbonBar and set tab in it and in that tab i've added 6 groups and each group on click i've applied 6 diffrent themes in the tool box but nothing is working
0
Jack
Telerik team
answered on 03 Jul 2012, 11:48 AM
Hi Manesh,

Have you checked the help article mentioned in the previous post in this thread? It demonstrates how to apply a theme. Please, note that you should load the respective theme assembly before setting a theme. You can do this with code, for example:
new Telerik.WinControls.Themes.Office2010Theme();

You should know that the ApplicationThemeName property has a greater priority than locally set ThemeName properties.

If this does not help, please send us your application and we will try to find a proper solution.

I am looking forward to your reply.

Greetings,
Jack
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Ryan
Top achievements
Rank 1
answered on 14 Jan 2014, 06:18 PM
I realize that this is dated, but it was causing me problems as well (and this was googles first hit).

You have to set the inheritance of the "RadForm" for your winforms in order for the form itself to use the themes on the forms themselves.  I think that was the missing link (it was for me).

Example:
    public partial class Form1 : Telerik.WinControls.UI.RadForm
    {
        public Form1()
        {
            InitializeComponent();
        }
0
Dimitar
Telerik team
answered on 17 Jan 2014, 12:12 PM
Hi Ryan,

Thank you for writing.

Indeed you cannot apply our themes to the default .NET forms, they are designed to work with the Telerik Presentation Framework elements, hence they are applicable to RadControls only.

If you want the theme to be applied to the Form, you should use RadForm, which is our wrapper of a form and supports theming. 

If you have any questions, please do not hesitate to contact us.

Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
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
Themes and Visual Style Builder
Asked by
Morten Nilsen
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Manesh
Top achievements
Rank 2
Jack
Telerik team
Ryan
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or