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

Using Themes

1 Answer 93 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Caroline Jaensch
Top achievements
Rank 1
Caroline Jaensch asked on 26 Jun 2009, 03:19 AM
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

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 01 Jul 2009, 12:54 PM
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.
Tags
Carousel
Asked by
Caroline Jaensch
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or