TreeWalker cant see element, but UIA Verify can. Help please!

Mar 26, 2013 at 12:51 PM
I'm trying to parse my UI using a TreeWalker. My UI consists mainly out of DevExpress components.

I have a single pane which contain one child pane and several child buttons. They're all on the same level so I suppose they are siblings. When I use the TreeWalker to parse the elements, I can only 'see' the pane - never the buttons.

What bugs me is when I use UIA Verify and select one of the buttons, it manages to build and draw the hierarchy. Then, if I select controls, via the context menu "Go to sibling", I can easily jump between the child pane and other child buttons.

I've tried all different versions of the TreeWalker e.g. Control and Raw, yet I end up with the same results - nothing - it only sees the child pane.

Can someone perhaps give me a high level overview of how UIA Verify is able to build up its hierarchy and still show (and manage to navigate between) all components? Why can't I replicate that in code?

Many thanks