Visual bug

5 posts, 1 answers
  1. Trude
    Trude avatar
    222 posts
    Member since:
    Jun 2009

    Posted 11 Feb 2010 Link to this post

    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.
  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 12 Feb 2010 Link to this post

    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.
  3. Trude
    Trude avatar
    222 posts
    Member since:
    Jun 2009

    Posted 18 Feb 2010 Link to this post

    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

  4. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 18 Feb 2010 Link to this post

    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.
  5. Trude
    Trude avatar
    222 posts
    Member since:
    Jun 2009

    Posted 19 Feb 2010 Link to this post

    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.
Back to Top