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

Modifying an Existing Theme

4 Answers 327 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
FilipN
Top achievements
Rank 1
FilipN asked on 30 Jul 2009, 12:12 PM
Hello telerik team,
I would like to edit existing Theme for our whole application - i read documentation page http://www.telerik.com/help/winforms/themes_workingmodifyingexisting.html and I wonder whether it's possible to "edit whole existing Office2007Black" theme - not just certain controls and then merge it into our .xml theme file.

4 Answers, 1 is accepted

Sort by
0
FilipN
Top achievements
Rank 1
answered on 30 Jul 2009, 12:14 PM
Another question: is it possible to edit existing theme for RadForm? (there is no smart tag on form so I cant open theme builder with Office2007Black set on the form)
0
Accepted
Nikolay
Telerik team
answered on 31 Jul 2009, 03:35 PM
Hello FilipN,

You can't modify the 'whole Office2007Black theme' (or another theme for different controls). You can modify Office2007Black theme for each control separately and then merge the themes in one big xml file.

As to the RadForm, its theme is a combination of two themes - the first one is for the RadTitleBar and the second one is for the client part of the form. Currently, opening Visual Style Builder from RadForm design-time is not supported. However, I am attaching the Office2007Black theme for the titlebar part and the client part to my message. Feel free to modify them according to your preferences.

I hope this helps. If you have additional questions, feel free to contact me.

Greetings,
Nikolay
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.
0
Darren Breed
Top achievements
Rank 1
answered on 07 Oct 2009, 02:05 PM
Hi,

We're looking to do exactly the same thing as FilipN but with the Desert theme. We have created a master XML file for all controls but are missing the RadForm settings. Could you please attach the XML we would need to just tweak the desert theme and form part of our XML file.

Thanks

0
Nikolay
Telerik team
answered on 14 Oct 2009, 07:32 AM

Hello Darren Breed,

Thank you for your interest in the Desert theme. I am attaching the titlebar and client parts of the RadForm to my message. Feel free to modify them according to your design preferences.

Please note that have a known issue with modifying an existing RadFrom theme in Q2 2009 SP1. This issue will be addressed in Q3 2009. For the time being, please follow the instructions below:

1. Open the Form's Desert Theme XML file and find the following XML construct:

<StylesheetRelations>  
        <RadStylesheetRelation ControlType="Telerik.WinControls.UI.RadForm" ElementType="Telerik.WinControls.RootRadElement" />  
</StylesheetRelations>  

This is normally positioned at the end of the file.

2. Change the stylesheet relation as shown below:

<StylesheetRelations>  
        <RadStylesheetRelation ControlType="Telerik.WinControls.UI.RadForm" ElementType="Telerik.WinControls.UI.FormRootElement" />  
</StylesheetRelations>  

3. Save the file and open it in the Visual Style Builder. You will see the settings of the Desert theme applied to the Form, i.e. the outer thin border will be set to dark brown, the inner thicker border will be set to lighter brown and the background color of the Form will be set to white.

4. Change the elements' appearance according to your preferences and save the file.

5. Open the saved file in a text editor and again find the following construct:

<StylesheetRelations>  
        <RadStylesheetRelation ControlType="Telerik.WinControls.UI.RadForm" ElementType="Telerik.WinControls.UI.FormRootElement" />  
</StylesheetRelations>  

6. Change it accordingly and save the file:

<StylesheetRelations>  
        <RadStylesheetRelation ControlType="Telerik.WinControls.UI.RadForm" ElementType="Telerik.WinControls.RootRadElement" />  
</StylesheetRelations>  

You should be able to use the modified theme in your project by loading it from the RadThemeManager component or by building a Theme Component and referencing it in your project.

I hope this helps. If you have additional questions, feel free to contact me.

Best wishes,

Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Themes and Visual Style Builder
Asked by
FilipN
Top achievements
Rank 1
Answers by
FilipN
Top achievements
Rank 1
Nikolay
Telerik team
Darren Breed
Top achievements
Rank 1
Share this question
or