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

EnableLostFocusSelectedState

3 Answers 284 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Geoffrey
Top achievements
Rank 1
Geoffrey asked on 14 Oct 2015, 01:10 PM
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

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 19 Oct 2015, 10:51 AM
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
0
Geoffrey
Top achievements
Rank 1
answered on 26 Oct 2015, 01:46 PM

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 

0
Martin Ivanov
Telerik team
answered on 27 Oct 2015, 02:28 PM
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
Tags
TreeView
Asked by
Geoffrey
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Geoffrey
Top achievements
Rank 1
Share this question
or