EnableLostFocusSelectedState

4 posts, 0 answers
  1. Geoffrey
    Geoffrey avatar
    48 posts
    Member since:
    Mar 2013

    Posted 14 Oct 2015 Link to this post

    Hello,

    How to had the functionality of disable ​Lost Focus ​selected state in RadTreeView ?

    In the RadGridView, there is a property EnableLostFocusSelectedState to do that. Why not in RadTreeView ?

    Best regards,
    Geoffrey
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 19 Oct 2015 Link to this post

    Hi Geoffrey,

    RadTreeView doesn't support such functionality out of the box. However, you can achieve the desired effect by customizing the treeview control. I can suggest you couple approaches for implementing this:
    • You can extract and edit the ControlTemplate of RadTreeViewItem. Basically, you can find the VisualState with its x:Name set to SelectedUnfocused and remove it from the template along with the Border element with x:Name set to SelectionUnfocusedVisual. 
    • You can get the Border element (x:Name=SelectionUnfocusedVisual) that represents the selection when the control is unfocused using the ChildrenOfTypeExtensions.ChildrenOfType<T>() method. Then you can change its Opacity or Background so that the visual is hidden.
    Please try this and let me know if it works for you.

    Regards,
    Martin
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Geoffrey
    Geoffrey avatar
    48 posts
    Member since:
    Mar 2013

    Posted 26 Oct 2015 in reply to Martin Link to this post

    Hello,

    Thanks for your reply, I use the functionality of switching theme at runtime, so if I extract template, I must extract template of all themes ?
    Can you consider add this property for Q1 2016 ?

    Best regards,
    Geoffrey 

  5. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 27 Oct 2015 Link to this post

    Hi Geoffrey,

    Yes, if you prefer the approach with editing the template of the treeviewitem you will need to do this for each theme you are using. To avoid this you can consider the approach with the ChildrenOfTypeExtensins.

    About including the mentioned property in our next release, currently we made our planning and this won't be included. However, if think this is a must-have for RadTreeView you can check our feedback portal and log a request for such implementation there. This way we will have it logged in our system and we can consider its implementation and approve (or decline) the feature request if we decide that it is reasonable.

    Regards,
    Martin
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top