We have an application with StartPage.xaml where the control template for TabControl defines some grids and stack panels. This template has an itemPresenter element in the middle of xaml and a stack panel below it. Although it works great for the user, MS UI automation can only see tabs inside the elementβs presenter, and nothing else is defined at the same level in the template. I tried to add a standard button inside the stack panel, which cannot be seen by MS UIA, to check if this problem is related to custom user controls, but this standard button is also not visible for MS UIA. If I use Snoop, I can see all the elements from the template in the snoop tree at the corresponding levels of the template hierarchy. But MS UIA still cannot find them.
What could be wrong with controls that prevent MS UIA from finding them on the page?
source share