Cannot set theme on Combo Box from a style

2 posts, 0 answers
  1. Phoebe
    Phoebe avatar
    7 posts
    Member since:
    Jul 2010

    Posted 07 Jul 2010 Link to this post

    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
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 12 Jul 2010 Link to this post

    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
  3. DevCraft banner
Back to Top