RadComboBoxItem - When to use chrome control and when not to?

2 posts, 1 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 26 Oct 2010 Link to this post

    I was working with a RadComboBoxItem this morning and was puzzled to see that the only VSM states were 'Normal', 'MouseOver', and "Disabled'...  After a few minutes I discovered the 'IsSelected' property and bound the 'ButtonChrome.RenderSelected' property to it and things seemed to work fine.   The ButtonChrome control also has a RenderHighlighted property so I tried binding the IsHighlighted property to that and it also seemed to work....

    So my two questions are:
    1) Why not just bind the 'RenderHighlighted' property as well instead of using the VSM to switch it?  (Or reasons why this shouldn't be done)?
    2) Any particular reason the VSM doesn't have a "SelectionStates" group like the normal Silverilght ComboBox?

  2. Answer
    Pana avatar
    748 posts

    Posted 29 Oct 2010 Link to this post

    Hi Rob,

    The ChangeVisualState() of the RadComboBoxItem currently looks like this:

    private void ChangeVisualState(bool useTransitions)
        if (this.IsEnabled)
            if (this.IsHighlighted)
                this.GoToState(useTransitions, "MouseOver");
                this.GoToState(useTransitions, "Normal");
            this.GoToState(useTransitions, "Disabled");

    So it only has 3 states  - Disabled, Normal and MouseOver. It will render the selected item as "MouseOver"-ed until you mouse over another element. It will also move the "MouseOver" using tab navigation this has been so for long time and is

    I am glad you have figured out the ButtonChrome yourself. It is quite powerful tool if you are writing XAML by hand or doing a lot of custom templates as you can style one ButtonChrome and then drop chromes around and TemplateBinding them for IsMouseOver/IsSelected/IsHighlighted etc. and if you change the chrome's style all controls will pick the change from it.

    All the best,
    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 R3 2016 release webinar banner
Back to Top