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

Visual bug

4 Answers 65 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Trude
Top achievements
Rank 2
Trude asked on 11 Feb 2010, 08:43 AM
I'm creating a treeview with the following (relevant) code:

' item is the new node being inserted  
_tree_item = RadTreeView1.AddItemByPath(_parent_name & "\" & item.name, "\")  
_tree_item.DefaultImageSrc = indicator_image  
_tree_item.Tag = item.id  
_tree_item.IsTabStop = False 

Everything works as expected until the treeview loses it's focus to another control on the same page. The selected item then turns grey (normal behaviour), but when the treeview regains focus the selected item doesn't regain it's original colour (blue) - see attached image. No matter what item is selected they all stay grey.

If I remove the line "_tree_item.IsTabStop = False" the treeview works normally when losing/gaining focus, but that is not an option for us.

I'm using the latest internal build and the Windows7 theme.

4 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 12 Feb 2010, 12:37 PM
Hello Jorn,

Thank you for contacting us.

Here we tried the described case but did not find a buggy case. The only visual clue is the fact the current item is not emphasized if it is not selected.

We attached here our test application. Please give it a try and if we missed something please drip us a line.

Sincerely yours,
Ivan
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.
0
Trude
Top achievements
Rank 2
answered on 18 Feb 2010, 08:25 AM

I have now studied your excellent example - you understood my problem completely.
The first tree is defined as such:

<telerikNavigation:RadTreeView x:Name="treeXaml" SelectionMode="Single">   
 

 

 

 

If I add IsTabStop=False in the definition of of the tree itself you will see a different behaviour:

 

 

 

 

<telerikNavigation:RadTreeView x:Name="treeXaml" IsTabStop="False" SelectionMode="Single">   
 

 

 

 

The nodes stays grey even when they are clicked and selected. It's as if the control doesn't get focus visually.
If you do the same with the two bound trees you will see the same thing happening.
The tree with nodes IsTabStop=False will turn grey and the other tree works as expected.

PS! If the tree has focus initially the nodes are blue - otherwise they turn grey

0
Accepted
Kiril Stanoev
Telerik team
answered on 18 Feb 2010, 01:47 PM
Hi Jorn,

This behavior is as expected. Setting IsTabStop="False" to the RadTreeView(treeXaml) and all its children will result in you being unable to focus the tree, thus not firing the Focused state(the orange color). Try setting IsTabStop="False" to the TextBox you will see that it cannot be clicked as well. Try replacing the RadTreeView (treeXaml) with regular Silverlight TreeView and the behavior will be the same. If it is acceptable, you can leave the RadTreeView with IsTabStop="True" and mark all its RadTreeViewItems with IsTabStop="False". Let me know what's your opinion on the subject.

Greetings,
Kiril Stanoev
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.
0
Trude
Top achievements
Rank 2
answered on 19 Feb 2010, 09:47 AM
I understand and it's acceptable behaviour. I was put off / confused by the inital focus of the treeview where the items are blue even though the whole treeview has IsTabStop=False.
Tags
TreeView
Asked by
Trude
Top achievements
Rank 2
Answers by
Ivan
Telerik team
Trude
Top achievements
Rank 2
Kiril Stanoev
Telerik team
Share this question
or