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

Change a style element at runtime

1 Answer 163 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Bryan Brannon
Top achievements
Rank 2
Bryan Brannon asked on 22 Jan 2007, 06:49 PM
Is there a way to change or override a theme attribute or color at runtime?  I can make a new theme for the button/control and change the theme at runtime but would like to change like the background color at runtime.  Is this possible?

1 Answer, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 23 Jan 2007, 02:00 PM
Hello Bryan,

Actually there is a way to change or "overwrite" the style at runtime, though it is not currently very simple to do that.

Attached is a sample application that demonstrates the stylesheet API, that is also used internally by RadControl to populate the Style of the controls, depending on the theme selected. As demonstrated, the actual task to change an element property is not very hard to achieve. The difficulty in the case presented in the example comes from the dynamic style behavior - the ribbon chunks' fill colors are animated when the IsMouseOver property changes.

Kind regards,
Mike
the telerik team
Tags
Themes and Visual Style Builder
Asked by
Bryan Brannon
Top achievements
Rank 2
Answers by
Mike
Telerik team
Share this question
or