1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to get an avalaible themes collection?

How to get an avalaible themes collection?

5 posts, 0 answered
  1. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    04 Jun 2009
    Link to this post

    Hello all!!!

    I want to get avalaible themes and add their to RadDropDown component. And when selected RadDropDown items switch theme to selected. How I can do it?

  2. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    05 Jun 2009
    Link to this post
    Anybody know answer for this question?
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 Jun 2009
    Link to this post
    Hi rent,

    You could try using UrlHelper.GetThemes() method to get all themes. Then bind them to a dropdown list control.

    private DropDownList themes;  
        // your logic here  
    this.themes.DataSource = UrlHelper.GetThemes();  
    this.themes.DataBind(); 

    Sincerely yours,
    Ivan Dimitrov
    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.
  4. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    09 Jun 2009
    Link to this post
    And how to change th pages themes by selecting theme name in RadDropDown componwnt?....I think may be made a component ThemeSelector, which will be placed in page and users can change th current theme for itself......
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    09 Jun 2009
    Link to this post
    Hello rent,

    You can change the page theme only OnPreInit event. The Control Execution Lifecycle does not support this event. You should consider other way for changing the themes.

    Regards,
    Ivan Dimitrov
    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.
Register for webinar
5 posts, 0 answered