This question is locked. New answers and comments are not allowed.
Is there any way to set attached property "telerik:StyleManager.Theme" on MS textbox from style? I tried this way:
but it doesn't work.
<Style TargetType="TextBox"> |
<Setter Property="telerik:StyleManager.Theme" Value="Office_Black"/> |
</Style> |
but it doesn't work.
10 Answers, 1 is accepted
0
Hello Alex,
Please find attached an example.
Dimitrina
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.
Please find attached an example.
If you have further questions please do not hesitate to ask us.
I hope this will help you.
Dimitrina
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.
0

Alex
Top achievements
Rank 1
answered on 26 Feb 2010, 02:20 PM
Thank you for an example - It works well. But I can't get it worked on SL4 beta. I need to use it in implicit style (it's a new feature in SL4) in this manner:
It seems that this feature doesn't work in beta. Can you confirm it?
<UserControl x:Class="SilverlightProject.MainPage" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"> |
<UserControl.Resources> |
<Style TargetType="TextBox" telerik:StyleManager.BasedOn="Office_BlackTheme"> |
</Style> |
</UserControl.Resources> |
<Grid x:Name="LayoutRoot"> |
<TextBox Text="TextBox" /> |
</Grid> |
</UserControl> |
It seems that this feature doesn't work in beta. Can you confirm it?
0
Accepted
Hi Alex,
Please find attached a sample project that demonstrates the desired functionality.
In it you can find the assemblies from the last internal build.
All the best,
Bobi
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.
Please find attached a sample project that demonstrates the desired functionality.
In it you can find the assemblies from the last internal build.
All the best,
Bobi
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.
0

Alex
Top achievements
Rank 1
answered on 04 Mar 2010, 12:49 PM
Thanks a lot, it works well now.
0

royalblue
Top achievements
Rank 1
answered on 23 May 2010, 11:13 AM
How can I do in Silverlight 4 ?
This sample run on Silverlight 3 successfully but in Silverlight 4 don't run.
(I use RadControls_for_Silverlight_4_2010_1_0422_TRIAL_hotfix TRIAL dll's)
This sample run on Silverlight 3 successfully but in Silverlight 4 don't run.
(I use RadControls_for_Silverlight_4_2010_1_0422_TRIAL_hotfix TRIAL dll's)
0

Alex
Top achievements
Rank 1
answered on 24 May 2010, 05:56 AM
What do you mean? How does it "don't run"? I've checked last sample (silverlightapplication3-2.zip) again - it works well. It successfully compiles and runs. At runtime it implicitly use defined style - textbox border becomes orange when textbox in focus. I recompiled the project with 2010.1.422.1040 dlls.
0
Hello Serdar YILMAZ,
The solution works as expected with the RadControls_for_Silverlight_4_2010_1_0422_TRIAL_hotfix .dlls on our side.
Please take a look at the attached project and let us know if it works for you or if you need more info.
Greetings,
Tina Stancheva
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.
The solution works as expected with the RadControls_for_Silverlight_4_2010_1_0422_TRIAL_hotfix .dlls on our side.
Please take a look at the attached project and let us know if it works for you or if you need more info.
Greetings,
Tina Stancheva
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.
0

Riia
Top achievements
Rank 1
answered on 22 Dec 2010, 06:43 AM
Hi,
I would like to ask few questions related to setting theme from style.
For some reason I wasn't able to use StyleManager:BasedOn but using following I was able to set style for RadGridView
<Setter Property="telerik:StyleManager.Theme" Value="Windows7"/>
In addition to that I would like to set some other properties from style but if I define for example BorderBrush and BorderThickness after setting theme they do not apply to the grid. Should I be able to set both theme and also other properties in the same style?
Is there any documentation related to this?
Best regards,
Riia
I would like to ask few questions related to setting theme from style.
For some reason I wasn't able to use StyleManager:BasedOn but using following I was able to set style for RadGridView
<Setter Property="telerik:StyleManager.Theme" Value="Windows7"/>
In addition to that I would like to set some other properties from style but if I define for example BorderBrush and BorderThickness after setting theme they do not apply to the grid. Should I be able to set both theme and also other properties in the same style?
Is there any documentation related to this?
Best regards,
Riia
0
Hi Alex,
Vanya Pavlova
the Telerik team
Considering the theming mechanism you can use these styles but the changes will be applied against the default Office_Black theme. However if you need to change a style related to a specific theme you need to get the specific theme template and its resources and apply the changes on your own.
I believe that the following article "Modifying built-in Theme" would be helpful for you on that matter.
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0

Jeff
Top achievements
Rank 1
answered on 20 Mar 2013, 06:56 PM
How would one achieve this for the WPF controls? The BasedOn property doesn't seem to exist for StyleManager in WPF.
UPDATE: Nevermind I figured it out myself. Looks like another special case of a feature created to make up for deficits in Silverlight when compared to features of WPF. For those who might care this can be achieved simply in WPF by using the following syntax.
UPDATE: Nevermind I figured it out myself. Looks like another special case of a feature created to make up for deficits in Silverlight when compared to features of WPF. For those who might care this can be achieved simply in WPF by using the following syntax.
<
Style
BasedOn
=
"{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=telerik:RadComboBox}}"
/>