When you want to set focus to another control in the AfterSelect method of a treeview there seems to be a problem with the behavior. Focus is set to the control but is then returned to the Treeview.
Forcing the Focus asynchronously seems to solve this little issue.
Add a delegate:
private delegate bool _methodInvoker();
Now in the AfterSelect handler add the following code:
Kept me busy quite some time :-(