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

[Solved] radwindow customize stylesheet, skin

3 Answers 191 Views
Window
This is a migrated thread and some comments may be shown as answers.
Raja
Top achievements
Rank 1
Raja asked on 10 Jun 2009, 06:14 AM
Hi,

I would like to rename the style descriptor with my own name. Is it possible? (I tried to change the descriptor name in Window.css and overridden 'CssClassFormatString' property to return my descriptor name, but it is not working as expected).

Is it possible to consolidate Window.css and Window.Default.css into one common file?

Thanks!

Raja

 

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 10 Jun 2009, 07:22 AM
Hi Raja,

I am not quite sure I understand what you need to do, so I assume that you want to take our default skin, and name it your own way, and yet to merge both basestylesheet and skin stylesheet.

1. Think of a name of your skin, for example - MyCustomSkin;
2. Copy Window.Default.css in your project, and change the name to Window.MyCustomSkin.css;
3. Open Window.MyCustomSkin.css and replace all occurencies of Default to MyCustomSkin;
4. In the server declaration of RadWindow set:
    - Skin="MyCustomSkin"
    - EnableEmbeddedSkins="false"
    - EnableEmbeddedBaseStylesheet="false"
5. Open Window.css, and copy its contents above the rules of Window.MyCustomSkin.css. Make sure you copy them above the skin-specific rules in the file, not below.
6. Register Window.MyCustomSkin.css in the <head /> section of your page using the <link /> tag.
7. Reload the page to see if the skin is applied;

Kind regards,
Martin Ivanov
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
Raja
Top achievements
Rank 1
answered on 10 Jun 2009, 08:02 AM
Hi,

Thanks for the reply.

I will check out the merging of style sheet you explained above.

To rephrase my requirement, in Window.css and Window.Default.css, the style descriptors are defined like '.RadWindow .rwTopResize' and I want to replace .RadWindow with my own name like '.window .rwTopResize'
 In order to pick new style descriptor, I overridden 'CssClassFormatString'. But it is not working as expected.

protected

 

override string CssClassFormatString

 

{

 

    get

 

    {

 

        return "window window_{0}";

 

    }

}

Thanks again for your support.

Regards,

Raja

0
Fiko
Telerik team
answered on 12 Jun 2009, 03:35 PM
Hello Raja,

This property is inherited from the base RadControl class, but it is not applicable in the RadWindow control, because the RadWindow objects are created on the client. Please note that we do not recommend you override it. We are not quite sure what is your scenario, but we attached a demo where we use two skins in a web page without any conflicts. In case that this information does not satisfy you, please open a new support ticket and send us a runnable project including additional information about the desired result. Once we have a clear view over your requirements and your project we can do our best to provide a working solution.

Best wishes,
Fiko
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.
Tags
Window
Asked by
Raja
Top achievements
Rank 1
Answers by
Martin
Telerik team
Raja
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or