This is a migrated thread and some comments may be shown as answers.

Create my own GridViewCellAutomationPeer

3 Answers 139 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jose
Top achievements
Rank 1
Jose asked on 30 Mar 2017, 09:20 AM

Hi,

I have a RadGridView showing up data using a GridViewDataColumn.CellTemplate with just one column and I want the Windows Narrator to narrate the correct info of the DataRows. Using Inspect.exe I realised that the GridViewCell's LocalizedControlType property is Custom. I tried to create an AutomationPeer for all the RadGridView child hierarchy elements to override the GridViewCellAutomationPeer's properties like LocalizedControlType, Name etc, but Narrator narrates nothing and the Inspect.exe does not focus on the GridViewCell as expected.

So, how can I modify the AutomationPeer elements of a RadGridView or just configure it for customising the Windows Narrator and other accessibility issues?

thanks,,

josemiguel

3 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 03 Apr 2017, 02:25 PM
Hi,

I am afraid that this would not be a trivial task. In order to override the default automation peer of a control, you need to inherit it and override the OnCreateAutomationPeer method, returning the custom peer there. However, it will be very difficult to force RadGridView to use custom cells. 
A possible solution would be to make those changes in the source code and the create a custom build that includes them.
Another option that might help you achieve such results is to use GridViewColumn's CellTemplate to generate custom display elements in the cells. then you can overrider those display elements' UI automation logic.
Can you please specify what goal you are trying to achieve, so that we can think of other possible options?

Regards,
Ivan Ivanov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Jose
Top achievements
Rank 1
answered on 11 Apr 2017, 09:54 AM

Hi,

Basically Windows Narrator is narrating "Custom" + more useless data, so I want to override this and set ItemType to "data item" and to bind "Name" and/or other automation peer properties...

thanks!

josemiguel

0
Ivan Ivanov
Telerik team
answered on 14 Apr 2017, 08:09 AM
Hello,

We will need a bit more time to research the possibilities to customize the behavior without introducing a breaking change. I will write back in this thread as soon as we have any relevant info.

Regards,
Ivan Ivanov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Jose
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Jose
Top achievements
Rank 1
Share this question
or