Telerik.Windows.Controls.StyleManager.ApplicationTheme = Telerik.Windows.Controls.ThemeManager.FromName("Vista");
But this theme doesn't influence to MS standard Controls. Do this theme not support for MS Standard Controls?
6 Answers, 1 is accepted
Yes our themes include styles for MS controls but you have to set them explicitly like this:
<UserControl x:Class="SilverlightDockingDemo.Page53" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"> |
<UserControl.Resources> |
<telerik:Theme x:Key="vistaTheme" |
Source="/Telerik.Windows.Themes.Vista;component/Themes/generic.xaml" /> |
</UserControl.Resources> |
<Grid x:Name="LayoutRoot" Background="White"> |
<Button telerik:StyleManager.Theme="{StaticResource vistaTheme}" /> |
</Grid> |
</UserControl> |
Let me know if you need more information.
Regards,
Hristo
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.
. If I want to change the theme Vista to an another theme what should I do?. Such as RainierPurple theme. can It change as the following code in MS standard control.
Uri uri = new Uri(@"SilverlightPrototype;component/ThemeBrowser/RainierPurple.xaml", UriKind.Relative);
ImplicitStyleManager.SetResourceDictionaryUri(LayoutRootSt, uri);
ImplicitStyleManager.SetApplyMode(LayoutRootSt, ImplicitStylesApplyMode.Auto);
ImplicitStyleManager.Apply(LayoutRootSt);
<UserControl.Resources> |
<telerik:Theme x:Key="vistaTheme" |
Source="/Telerik.Windows.Themes.Vista;component/Themes/generic.xaml" /> |
</UserControl.Resources> |
<Grid x:Name="LayoutRoot" Background="White"> |
<Button telerik:StyleManager.Theme="{StaticResource vistaTheme}" /> |
</Grid> |
</UserControl> |
Hi xuan,
We have supplied three themes - Vista, Summer and the default Office_Black.
Using ImplicitStyleManager wouldn't have effect over RadControls for Silverlight because in RainierPurple there are no style defined for our controls.
If you have xaml file with styles that you have defined or customized you can still use Theme class and set its source to the xaml file. This way you can set this xaml to be your application theme or you can apply this theme to some controls.
Here is how to define theme with custom xaml file:
<telerik:Theme x:Key="customTheme" |
Source="/YourAssembly;component/PathToTheXAMLFile.xaml" /> |
In my previous post you can see how to apply it to some controls.
If you want to make it a global (application) theme you can set IsApplicationTheme=true.
Do not hesitate to contact us in case you have more questions.
Greetings,
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.
if I do apply a telerik style to a standard control (in my case it is a TextBox) which is placed on a telerik control (RadPane, RadTabItem, ...) then I have to click twice on it to get the input focus to the control. Is this a known problem? What can I do?
I tested the issue but was not able to reproduce it. Could you please send us a simple project that can help us reproduce the issue. I tested it with 2 Textboxes in a RadPane and set them Vista and Summer theme and they were working fine.
Regards,
Boyan
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.