This is a migrated thread and some comments may be shown as answers.

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

1 Answer 29 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
aaka
Top achievements
Rank 1
aaka asked on 17 Nov 2010, 04:28 PM
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.

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 22 Nov 2010, 06:57 PM
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
Tags
TreeView
Asked by
aaka
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or