Simple C#/WPF code for a MouseDoubleClick on a ListBox item?

bhs67

Well-known member
Joined
Oct 11, 2021
Messages
52
Programming Experience
10+
There are numerous comments about MouseDoubleClick for a ListBox and ListView. Most are a bit complicated.

One that looks simple is MouseBinding.Gesture Property (System.Windows.Input). However, it is not clear if this would work for a ListBox, or how to implement it.

Is there an example of simple C#/WPF code for a MouseDoubleClick on a ListBox item? The MouseDoubleClick jumps to the C# code (similar to a Button_Click).
 
Have you read the following?

Basically WPF is not WinForms. Don't think in terms of WinForms. For that matter, you shouldn't really be looking at events on WPF unless you are writing a new custom control from scratch. Looking at events is the WinForms way of doing things. Looking at commands is the WPF way of doing things.
 
Thanks for the response! Perhaps this feature could be added to .NET? I don't know which forum is a place to request this feature. There are many who would use it. Thanks!
 
What feature are you talking about?
 

Latest posts

Back
Top Bottom