How to modify the RollOver Colors for a ComboBox

6 posts, 1 answers
  1. Bob
    Bob avatar
    59 posts
    Member since:
    Aug 2010

    Posted 28 Jul 2011 Link to this post

    How do you modify the RollOver Colors for a ComboBox, are there properties that need to be exposed in order to do this. Or can the RollOver be Disabled in the event you can't modify the colors?
    Regards.
  2. Answer
    Dani
    Admin
    Dani avatar
    848 posts

    Posted 28 Jul 2011 Link to this post

    Hi Bob,

    There are no exposed properties for the visual states in particular. Our theming mechanism is build in such a way that it tries to keep consistency across all controls. That is why controls such as RadComboBox, RadButton, RadNumericUpDown, etc. use a ButtonChrome control in their control templates. The ButtonChrome is responsible for rendering mouse over brushes, pressed and selection brushes, etc.

    To change the mouse over color of RadComboBox, you need to apply a Style for the ButtonChrome. Attached is a short movie that shows how to do that. Please, note that after you generate the style for ButtonChrome, you have to make sure all your brushes reside at the top of the page, before any other Styles that reference them.

    Although the movie shows how to change the mouse over for the Silverlight version of RadComboBox, the approach is the same for the WPF version.

    I hope this helps.

    Greetings,
    Dani
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for WPF is Visual Studio 2017 Ready
  4. Mike
    Mike avatar
    3 posts
    Member since:
    Aug 2012

    Posted 22 Aug 2012 Link to this post

    Why doesn't anything show up in the Resource panel when I create a copy of the template? This is a WPF project.
  5. Mike
    Mike avatar
    3 posts
    Member since:
    Aug 2012

    Posted 22 Aug 2012 Link to this post

    It looks like these controls were not made with the resource panel in mind. Well at least I found out how to customize the style:
    http://www.telerik.com/help/silverlight/radcombobox-styles-templates-modifying-brushes.html
  6. Mike
    Mike avatar
    3 posts
    Member since:
    Aug 2012

    Posted 23 Aug 2012 Link to this post

    Now the question is how do you change the selection color inside the Popup. This would be so much easier if the brushes were made available to the resources panel. Am I missing something here?
  7. Masha
    Admin
    Masha avatar
    355 posts

    Posted 27 Aug 2012 Link to this post

    Hello Bob,

    To customize the selection color inside of RadComboBoxItemyou will have to edit the style of the RadComboBoxItemStyle.   Find the following
    <Border x:Name="HighlightVisual" Visibility="Collapsed" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="1" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" Background="{StaticResource ControlBackground_Highlighted}">
     and change the Background property to the colour of your choice.

    Hope this helps.

    Greetings,
    Maria
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready