Kevin Finke
Top achievements
Rank 1
Kevin Finke
asked on 09 Feb 2011, 09:09 PM
We control all of our app's appearance through styles. I would like to apply a theme to a RadTabControl in this way. I have:
<
telerik:Theme
x:Key
=
"Windows7"
Source
=
"/Telerik.Windows.Themes.Windows7;component/themes/generic.xaml"
/>
<
Style
TargetType
=
"telerik:RadTabControl"
>
<
Setter
Property
=
"telerik:StyleManager.Theme"
Value
=
"{StaticResource Windows7}"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Stretch"
/>
</
Style
>
However, it doesn't appear to be working. Any suggestions?
5 Answers, 1 is accepted
0
Hello Kevin Finke,
Please try to apply it as follows:
and let us know if it works correctly.
All the best,
Sia
the Telerik team
Please try to apply it as follows:
<
Style
TargetType
=
"telerik:RadTabControl"
telerik:StyleManager.Theme={StaticResource Windows7} >
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Stretch"
/>
</
Style
>
All the best,
Sia
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Kevin Finke
Top achievements
Rank 1
answered on 11 Feb 2011, 09:42 PM
No, that doesn't appear to work either. Anything else? I have:
<telerik:Theme x:Key="Windows7"
Source="/Telerik.Windows.Themes.Windows7;component/themes/generic.xaml" />
<Style TargetType="telerik:RadTabControl" telerik:StyleManager.Theme="{StaticResource Windows7}">
<!--<Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Windows7}"/>-->
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
</Style>
0
Hello Kevin Finke,
Can you give us more information about your goal? Do you want to use a custom theme as described in this help topic or you want to base the RadTabControl style on the default one (from the Windows7 theme) and modify it subsequently? or you are trying just to apply the Windows 7 theme as described here?
Can you please send us a sample project so we can investigate your case in detail? And if possible to modify it in order to work correctly.
Thank you in advance,
Sia
the Telerik team
Can you give us more information about your goal? Do you want to use a custom theme as described in this help topic or you want to base the RadTabControl style on the default one (from the Windows7 theme) and modify it subsequently? or you are trying just to apply the Windows 7 theme as described here?
Can you please send us a sample project so we can investigate your case in detail? And if possible to modify it in order to work correctly.
Thank you in advance,
Sia
the Telerik team
0
Kevin Finke
Top achievements
Rank 1
answered on 16 Feb 2011, 07:30 PM
Actually, what I wanted was your second link, but I couldn't get it to work that way. I figured since this was not your average property (StyleManager.Theme), I was looking for a not so simple solution. However, it turns out the following actually works:
Go figure!
<Style TargetType="telerik:RadTabControl" >
<Setter Property="telerik:StyleManager.Theme" Value="Windows7"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
</Style>
Go figure!
0
Hello Kevin Finke,
I am happy that you find the solution you needed. If any other questions arise do not hesitate to contact us again.
Greetings,
Sia
the Telerik team
I am happy that you find the solution you needed. If any other questions arise do not hesitate to contact us again.
Greetings,
Sia
the Telerik team