Selection from code produce different highlighting colors then selection with mouse.

2 posts, 0 answers
  1. aaka
    aaka avatar
    7 posts
    Member since:
    Nov 2006

    Posted 17 Nov 2010 Link to this post

    I've attached two images to show the difference in highlightning colors.
    When i use the mouse to do a selection the selected node gets a background color like selmanual2.png.
    When i use RadTreeView.SelectedItem = RadTreeNode, the backgound color becomes like selcode2.png.

    The white background color causes problems since my font is white.
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 22 Nov 2010 Link to this post

    Hi aaka,

    This behavior is caused by the fact that when you select a RadTreeViewItem on MouseClick the item is selected and focused at the same time. However, selecting an item in code behind only selects it and doesn't focus it unless you implicitely focus it as well.

    So I'd suggest you look into the Focused visual state of the RadTreeViewItem and the style changes it applies. I hope this info helps. Still, if it doesn't, you can send us a sample project reproducing the issue and a snapshot illustrating your goal and we will help you implement it.

    All the best,
    Tina Stancheva
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top