Using Themes

2 posts, 0 answers
  1. Caroline Jaensch
    Caroline Jaensch avatar
    3 posts
    Member since:
    Feb 2009

    Posted 25 Jun 2009 Link to this post

    Is there a way to apply a theme at runtime to an individual element in a radCarousel e.g. apply a theme to radButtonElement.

    Regards,

    David
  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 01 Jul 2009 Link to this post

    Hello Caroline Jaensch,

    Thank you for the question

    Generally, you can set a theme only at a control level. Themes cannot be set at an element level. This behavior is designed to bring you performance optimizations.

    Still, there is a way to apply a custom style for a RadButtonElement. In order to do so, you should take the style from an existing theme containing settings for a button and then apply this style to the desired button element:
    StyleBuilder builder = ThemeResolutionService.GetRegisteredControlStyleBuilder(  
    typeof(RadCarousel).FullName,  
    typeof(RootRadElement).FullName,  
    "Desert");  
    if (builder != null)  
    {  
        builder.BuildStyle(this.radCarousel1.CarouselElement.ButtonPrevious);  

    I am attaching a sample project which demonstrates this approach. If you have additional questions, feel free to contact me.

    Regards,
    Nikolay
    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top