Nobody asked that before:
What is an efficient way to avoid the expansion of certain TreeNode class descendants in a WinForms TreeView when the user does the “Expand all” thing, but still let him expand such nodes by clicking on the + symbol?
Sure I can handle BeforeExpand, but I have a hard time setting e.Cancel to true only if it is an ExpandAll operation. I wonder how I can determine this? I could subclass TreeView and override ExpandAll — but that one cannot be overriden…
This works 100%. I think. Sigh.