9 Answers, 1 is accepted
Thank you for the questions.
Currently the RadControls for Winforms does not support different themes in one xml file. The only way to make different visual settings on two separate controls from the same type is to make two theme files and apply them individually to your controls.
Do not hesitate to contact me again if you have other questions.
Best wishes,
Martin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for writing.
Yes the previously provided answer is still valid. Also the ThemeClassName property is used in order the control to be bound with the proper styles in the theme. This is why we need to override this property when we creating custom controls for example.
Please let me know if there is something else I can help you with.
Dimitar
Telerik
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).
Can we have multiple themes in one file or still need different theme (.xml) files?
Best Regards,
Ryan
Thank you for writing.
You cannot have multiple themes in one file. Visual Style Builder allows you to create a different styles for each control and to save the theme with a particular name. Each control in your application that uses this theme will take the predefined styles from it. In addition you can save the theme as a single file or separate xml files.
You can have many themes in one application and you can use different theme for each control. Detailed information about the themes is available in the following articles:
- Using custom themes
- Loading Predefined Themes
- Working With Repository Items
- Applying a Theme to a Control
- Using a default theme for the entire application
I hope this helps. Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I thought I could use this concept to have a different theme for some of the controls on the ribbon bar, but the controls (in particular the RadButtonElement controls) don't appear to have a ThemeName property. Is it possible to use a separate theme for controls on the ribbon, apart from the theme that's assigned to the ribbon bar itself?
Thank you!
Emily
Thank you for writing.
You can set the theme only for controls, not elements. As a workaround, you can use RadHostItem to add controls to the ribbon:
var button =
new
RadButton();
button.Text =
"test"
;
button.ThemeName =
"TelerikMetro"
;
var item =
new
RadHostItem(button);
item.MinSize =
new
Size(200, 22);
this
.RadRibbonBarGroup1.Items.Add(item);
Please let me know if there is something else I can help you with.
Dimitar
Telerik