WinForms

WinForms

WinForms bug: NodeMouseDoubleClick event in TreeView will sometimes have the wrong node in EventArgs

Here's a strange bug I've encountered today in a WinForms application. Usually, double clicking on a collapsed tree node (which obviously has child nodes) will expand it. Most of the time when we need something to happen when a child node is double clicked, but not the parent, we write something similar to: 1: void NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) 2: { 3: if (e.Node.Nodes.Count == 0) 4: ...

«September»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789