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

Cannot set theme on Combo Box from a style

1 Answer 78 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Phoebe
Top achievements
Rank 1
Phoebe asked on 07 Jul 2010, 04:09 PM
I am unable to set the theme on Rad Combo Boxes from a style. This is the same issue I was having recently in which I couldn't set the theme on Rad Masked Text Boxes from a style. This was resolved by the attached example given by Telerik in this thread:

http://www.telerik.com/community/forums/silverlight/maskedtextbox/cannot-set-mask-type-in-style.aspx

The solution for setting the theme in the style was to create a static resource of the Summer theme, and then base the Rad Masked Text Box style on this static resource.

My issue now is that I tried doing the same thing but with a Rad Combo Box style instead, and discoverd that the theme is ignored. All other properties from the style are applied (like Width, Margin, etc.) except for the theme. 

Please see my code below. (Since this is the same xaml file that contains the style for the Rad Masked Text Box from the other thread, I created a second theme resource and called it RadSummerTheme2. This was so that I didn't have two styles referencing the same resource in case that would cause issues).

<telerik:SummerTheme x:Key="RadSummerTheme2" /> 
 
<!--RadComboBoxStyle--> 
<Style x:Key="RadComboBoxStyle" TargetType="telerikInput:RadComboBox" telerik:StyleManager.BasedOn="{StaticResource RadSummerTheme2}" > 
    <Setter Property="Width" Value="500" /> 
    <Setter Property="Margin" Value="0,2" /> 
    <Setter Property="VerticalAlignment" Value="Center" /> 
    <Setter Property="HorizontalAlignment" Value="Left" /> 
</Style> 

To sum it up, I don't know why this method works on the Rad Masked Text Box and not on the Rad Combo Box.
Any help is appreciated!

Thanks,
Phoebe

1 Answer, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 12 Jul 2010, 02:45 PM
Hi Phoebe,

It does work for me. You can check the attachment. If you can send me a sample project that reproduces the problem I would try to fix it for you.

Kind regards,
Panayot
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
ComboBox
Asked by
Phoebe
Top achievements
Rank 1
Answers by
Pana
Telerik team
Share this question
or