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

Grids for WPF Forum

Posted 7 years ago by --
Version: 17.1.0651
Platform: .NET 4.6
Environment: Windows 10 (32-bit)


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?



Comments (2)

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

Hi Terry,

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

Actipro Software Support

Posted 7 years ago by --

That works.

Thanks for your help.

The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.