Hi all,
I'm trying to get a Silverlight datagrid interfacing correctly with screen readers. For this I need to ensure AutomationProperties are set correctly.
Adding this to the datagrid XAML sorts out the datagrid name...
Code:
<Grid x:Name="LayoutRoot" Background="White">
<sdk:DataGrid x:Name="PatientRecords"
AutomationProperties.Name="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
AutoGenerateColumns="True" Height="600" HorizontalAlignment="Left" Margin="45,36,0,0" VerticalAlignment="Top" Width="800">
</sdk:DataGrid>
but once inside the cells I get nothing. I cant see how to expose the automation properties on each row or column, especially when they are bound to a datasource rather than explicity defined in the XAML...
I think I need to me able to map the automationprops of the column header, for example, to read the column header text. I'd like to make a cell read the column header text as well as the row number and cell content.
I have tried defining the columns in XAML and have tried to hook the automationproperties up like this...
Code:
<sdk:DataGrid.Columns>
<sdk:DataGridTemplateColumn AutomationProperties.Name="Column Header"
But I get the compile error "events not supported on HWND-based channels" on the automationpropery.
Any pointers greatly appreciated!
Bob