How to prevent TreeListBox from exanding/contracting a node when double-clicking

Grids for WPF Forum

Posted 2 years ago by Terry Sprangers
Version: 17.1.0651
Platform: .NET 4.6
Environment: Windows 10 (32-bit)
Avatar

Hi,

I am trying to implement something similar to the solution explorer in Visual Studio, and would like to "open" the associated document when the user double-clicks on a node.  My code (handling the OnItemDefaultActionExecuting event) seems to mostly work, but I have noticed that the tree also expands/contracts when the user double-clicks. 

Is there any way to prevent this, so that it works more like Visual Studio?

 

Thanks

Comments (2)

Answer - Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Terry,

If you set e.Cancel = true, then it will prevent the default ToggleExpansion behavior.


Actipro Software Support

Posted 2 years ago by Terry Sprangers
Avatar

That works.

Thanks for your help.

The latest build of this product (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.