Show only some skins in the SkinChooser

2 posts, 0 answers
  1. Rick
    Rick avatar
    5 posts
    Member since:
    Jan 2013

    Posted 05 Mar 2013 Link to this post

    Hello all,

    We run a site using Telerik (Q1 2013) and have the SkinChooser dropdown and it works fine.

    Is it possible for this dropdown to only show some skins? (for example we want to OMIT all the Metro Skins) and just have the others listed there in the user control.

    Thanks in advance!
  2. Rick
    Rick avatar
    5 posts
    Member since:
    Jan 2013

    Posted 05 Mar 2013 Link to this post

    Ignore my question, we have solved it. Code below:

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        RemoveSkinFromChooser("BlackMetroTouch");
        RemoveSkinFromChooser("Glow");
        RemoveSkinFromChooser("Metro");
        RemoveSkinFromChooser("MetroTouch");
        RemoveSkinFromChooser("Office2010Black");
        RemoveSkinFromChooser("Office2010Blue");
        RemoveSkinFromChooser("Office2010Silver");
        RemoveSkinFromChooser("Silk");
        RemoveSkinFromChooser("Transparent");
    }
     
    private void RemoveSkinFromChooser(string skinName)
    {
        RadComboBox radCombo = GetSkinChooser();
        int item;
        item = radCombo.Items.FindItemIndexByText(skinName);
        if (item >= 0)
            radCombo.Items.Remove(item);
    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top