Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1540
How to set Focus on an XamTreeItem?
posted

I try to set Focus as follows:

     bool isFocused = xamTreeItem.Focus();

isFocused is false and visually you can tell the control doesn't receive focus.

Update: I set xamTreeItem.IsTabStop = true after reading about Control.Focus() and now xamTreeItem.Focus() returns true.  However, the focus actually ends up on the parent of xamTreeItem.  I have searched for ".Focus()" throughout the Project and cannott see another Focus() to account for this.

Also, when I remove the set focus statement above, the parent no longer receives focus.

Please help ASAP.