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

How to get the list of available built-in skins?

2 Answers 49 Views
SkinManager
This is a migrated thread and some comments may be shown as answers.
Condorito
Top achievements
Rank 1
Condorito asked on 13 Jun 2014, 03:24 PM
Hi,

Is there a way to get the list of available built-in skins without referencing a SkinManager? 

I understand that this will allow me to iterate through a SkinManager's list of skins:

Dim oChooser As RadComboBox = CType(oSkinManager.FindControl("SkinChooser"), RadComboBox)
For Each Item As RadComboBoxItem In oChooser.Items
...

However this won't work for us under certain situations because there may not be a SkinManager available when we need to find out if a skin still exists or not.
I tried to create a new RadSkinManager programmatically and then attempted to access its skin chooser, but the chooser comes back as an empty object.

Thank you for you help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 17 Jun 2014, 02:59 PM
Hello Juan,

The observation and conclusions that you have made are correct and without a RadSkinManager you will not be able to retrieve all of the available skins with such approach.

However, I could suggest that you try the following, more generic, way for retrieving the list of skins:
protected void Page_Load(object sender, EventArgs e)
{
    List<string> list = Telerik.Web.SkinRegistrar.GetEmbeddedSkinNames(typeof(RadGrid));
}

In general, it should not matter what control you are passing as parameter.

Hope this helps.


Regards,
Konstantin Dikov
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.

 
0
Condorito
Top achievements
Rank 1
answered on 19 Jun 2014, 06:46 PM
This worked.  Thank you for your help!
Tags
SkinManager
Asked by
Condorito
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Condorito
Top achievements
Rank 1
Share this question
or