The System.Web.UI.WebControls.TreeView class offers this event, but the Forms version of TreeView doesn\'t. What\'s the equivalent in the Forms world? I\'m using AfterSelect
There's none in WinForms TreeView. To quote MSDN for TreeView.AfterSelect:
This event does not occur when the node is unselected. To detect this occurrence, handle the Control.MouseUp event and test the TreeNode.IsSelected property.
You'd better use TreeView.NodeMouseClick event combined with AfterSelect. AfterSelect isn't called when you select the previously selected SelectedNode. So just call AfterSelect when necessary, e.Node helps you.
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (e.Node == tv.SelectedNode)
treeView1_AfterSelect(sender, null);
}