Modifying an Existing Theme

5 posts, 1 answers
  1. FilipN
    FilipN avatar
    15 posts
    Member since:
    Jul 2009

    Posted 30 Jul 2009 Link to this post

    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.
  2. FilipN
    FilipN avatar
    15 posts
    Member since:
    Jul 2009

    Posted 30 Jul 2009 Link to this post

    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)
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 31 Jul 2009 Link to this post

    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.
  5. Darren Breed
    Darren Breed avatar
    1 posts
    Member since:
    Oct 2009

    Posted 07 Oct 2009 Link to this post

    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

  6. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 14 Oct 2009 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready