Expose the Content of a Table Using UI Automation
This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation namespace. For the latest information about UI Automation, see Windows Automation API: UI Automation.
This topic shows how Microsoft UI Automation can be used to expose the content and intrinsic properties of each cell within a tabular control.
The following code example demonstrates how to obtain a AutomationElement that represents the content of a table cell; cell properties such as row and column indices, row and column spans, and row and column header information are also obtained. This example uses a focus change event handler to simulate keyboard traversal of a tabular control that implements UI Automation. Information for each table item is exposed on a focus change event.
Since focus changes are global desktop events, focus change events outside the table should be filtered. See the for a related implementation.4a91c0af-6bb5-4d38-a743-cf136f268fc9