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

Grids for WPF Forum

Posted 5 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 5 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 5 years ago by --

That works.

Thanks for your help.

The latest build of this product (v22.1.3) was released 21 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.