I am working on creating some UI Automation for a WPF application for my company and I would like to get the tab order of the controls on a form. Currently I am just sending the tab key to check the tab order and getting the focused control after a tab is sent. I would like to get the tab order and compare it to the previous tab order to tell if something changed.
I have access to the code and could probably expose this information through some kind of communication layer to inform my application about the tab order but would prefer to do this through an exposed windows API if one exists. Does anyone have any suggestions for getting the tab order with existing APIs?