RadComboBox Background

2 posts, 0 answers
  1. Elena
    Elena avatar
    8 posts
    Member since:
    Jun 2011

    Posted 10 May 2013 Link to this post

    Hi,
    We use RadComboBox in our Silverlight applocation. Perfect for large itemsSouce!!!
    But I try to change default value för  ButtonChrome background to lightblue 

    <LinearGradientBrush x:Key="ControlBackground_MouseOver" StartPoint="0.5,0" EndPoint="0.5,1">

     

     

     

    <GradientStop Color="#FFBDE4F9" Offset="0" />

     

     

    <GradientStop Color="#FFB4E0F7" Offset="0.5" />

     

     

    <GradientStop Color="#FF98D1EF" Offset="0.5" />

     

     

    <GradientStop Color="#FF81C3E5" Offset="1" />

     

     

    </LinearGradientBrush>

     

    in
    -------
    <vsm:VisualState x:Name="MouseOver">

    <Storyboard>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome"   Storyboard.TargetProperty="RenderMouseOver">

     <DiscreteObjectKeyFrame KeyTime="0:0:0">

     <DiscreteObjectKeyFrame.Value>

     <sys:Boolean>True</sys:Boolean>

     </DiscreteObjectKeyFrame.Value>

     </DiscreteObjectKeyFrame>

     </ObjectAnimationUsingKeyFrames>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="Background">

     <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}" />

     </ObjectAnimationUsingKeyFrames>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="Foreground">

     <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}" />

     </ObjectAnimationUsingKeyFrames>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">

     <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />

     </ObjectAnimationUsingKeyFrames>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">

     <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />

     </ObjectAnimationUsingKeyFrames>

      </Storyboard>

     </vsm:VisualState>

     <vsm:VisualState x:Name="DropDownOpen">

     <Storyboard>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">

     <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />

     </ObjectAnimationUsingKeyFrames>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">

     <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />

     </ObjectAnimationUsingKeyFrames>

     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="Background">

     <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}" />

     </ObjectAnimationUsingKeyFrames>

     </Storyboard>

     </vsm:VisualState>

    -----

     but unsuccessfully :(
    Cannot change theme in Blend, get error
    Would be very grateful for any suggestion.

    Best regards
    Elena
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 15 May 2013 Link to this post

    Hi Elena,

    For your convenience I extracted and edited the default Style of the RadComboBoxItem in the attached project. Please take a look at it and let me know if it works for you. Please note that in the attached project I changed only the Background property of the Border control called "HighlightVisual" (which is visualized when you hover any RadComboBoxItem).

    I hope this will work for you.

    All the best,
    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top