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

Overriding a single property

1 Answer 261 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 11 May 2011, 09:03 PM
Hello. I was wondering if it was possible to override a single property of the telerik themes.

For instance, if I use Telerik:StyleManager.Theme to apply the Office_Black theme to all textbox controls can I override the VerticalAlignment property to make it "Top"? I tried to override just that one property both in a resource and locally in the xaml on the control itself and neither one worked.

I've read a few things that say that you cannot override just one property in a theme applied to controls.

Any help would be greatly appreciated.

Thanks,

John

1 Answer, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 11 May 2011, 09:17 PM
Hi John,

 
You may create an implicit style based on any Telerik theme following the pattern below:

<Style TargetType="TextBox"
           BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Office_BlackTheme, ElementType=TextBox}}" >
<Setter Property="Background" Value="Red"/>
</Style>


Using this code you will override the default background for the TextBox control in our Office_Black theme.



Greetings,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or