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

Telerik skins for regular asp.net controls

5 Answers 173 Views
SkinManager
This is a migrated thread and some comments may be shown as answers.
brian
Top achievements
Rank 1
brian asked on 02 Nov 2011, 07:04 PM
Hi,

I am wondering whether or not it is possible to apply Telerik skins to regular ASP.NET controls (text box, label, drop down list etc). If it is in fact possible, can you please provide with snippet of how it can be done. 

Thanks!

5 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 03 Nov 2011, 07:30 AM
Hello,

you can achieve this thing by using FormDecorator.

By using

Thanks,
Jayesh Goyani
0
brian
Top achievements
Rank 1
answered on 03 Nov 2011, 05:16 PM
Thanks Jayesh, that seems to be working.
0
Sepehr
Top achievements
Rank 1
answered on 16 Oct 2013, 08:52 AM
Hi,

thanks for the well designed skins,
but the form-decorator does not apply the skin to all objects on the screen.

in my project, I have used skin-manager and form-decorator in master-page ,and user can select which skin he wants to use and the selected skin name is saved in his/her profile and reused every time he/she logs in.

my problem is that the form decorator does not apply the skin to all form element, i.e. it applies to <fieldset> but not to <table> and <div> and many other. this makes some inconveniences in UI design.

I would prefer that form-decorator could apply the skin to all objects on the page
if it is not possible, my question is:

How can I get different style elements based on current chosen skin. for example, how can I set the main page background and foreground color according to the currently selected skin?

Any extra (simple) information or samples on this issue is appreciated!
thanks for your help,
Sepehr
0
Danail Vasilev
Telerik team
answered on 18 Oct 2013, 12:03 PM
Hi Sepehr,

You can find the list of the simple HTML elements as well as the standard ASP controls which can be decorated by the RadFormDecorator in Integration With Standard Controls help article. You may also find useful the effect of RadFormDecorator on RadControls in Integration With RadControls help article.

HTML elements like divs and tables, however, do not get in the decoration scope of the RadFormDecorator control. What I can suggest, however, is to consider that RadFormDecorator applies its wrapper classes to the HTML elements and use them for a CSS cascade to style any elements that cannot be decorated by RadFormDecorator. By using the RadForm_SkinName to cascade, you will ensure to apply the styles you like to the desired element you want.

I have created a short VS example that illustrates such approach on decorating Table element with Forest and Sunset Skins. Once you have created the styles for the skins and set the classes to the elements, you can use the ShowChooser property of the RadSkinManager, in order to change the skins of the styled elements.

You can find the VS example as well as a short video that demonstrates this in the attached archive.

Regards,
Danail Vasilev
Telerik
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
0
Sepehr
Top achievements
Rank 1
answered on 19 Oct 2013, 11:53 AM
Daniel,
It was great!

your idea of CSS Cascading with RadForm_SkinName helped me a lot.

Thanks,
Sepehr
Tags
SkinManager
Asked by
brian
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
brian
Top achievements
Rank 1
Sepehr
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or