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.

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    Hello Joe,

     

    In XamTree you have a property called SelectionType. When this property is set to Extent you can select more than one item from the XamTree, but the ActiveItem is always one item. The ActiveItem is the item which has been selected last. You can see the attached  screenshot in which you can see than there are three selected items in the XamTree but the last item is the active item.

     

    If you need any further assistance please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    screenshot.zip
Children