Results 1 to 1 of 1

Threaded View

  1. #1

    Thread Starter
    Fanatic Member staticbob's Avatar
    Join Date
    Jan 2005
    Manchestershire, UK Cabbage: I do

    Datagrid Automation Properties

    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...

    <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">
    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...

                    <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!

    Last edited by staticbob; May 30th, 2011 at 09:13 AM.
    "I dislike 7 am. If 7 am were a person, I would punch 7 am in the biscuits." - Paul Ryan, DailyRamblings

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width