Search

UIElementAutomationPeer.CreatePeerForElement(element) return null id element is ContentControl by DarthMark

Closed

1
0
Sign in
to vote
Type: Bug
ID: 779525
Opened: 2/19/2013 11:47:58 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I think this is a bug, if I call the method for creating the automation peer for a ContentControl element it will return null.
UIElementAutomationPeer.CreatePeerForElement(element);

I have complex custom controls with some templatedpart done with ContentControls, when I override the method GetChildrenCore() to rpovide the propert AutomationPeer for the templated part of my control I can't return the AutomationPeer for the ContentControl, I have to Create my ContentControlAutomationPeer that use the VisualTreeHelper to navigate all its children and return all their AutomationPeer, but I'm asking why there isn't a default ContentControlAutomationPeer that could be returned by the method CreateAutomationPeerForElement ?
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

var element = new ContentControl();
var automationPeer = UIElementAutomationPeer.CreatePeerForElement(element);

automationPeer is null

Product Language

English

Operating System

Windows 7

Operating System Language

Italian

Actual results

automationPeer is null

Expected results

I expected that the method CreatePeerForElement(element) returned a ContentControlAutomationPeer.

The ContentControlAutomationPeer will have to expose the AutomationPeer of its content and recursively it will be possible to access all the AuomtaionPeers for its children.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 3/4/2013 at 2:56 PM
The WPF team has recently reviewed this issue and will not be addressing this issue as at this time the team is focusing on the bugs impacting the highest number of WPF developers. If you believe that this was resolved in error, please reactivate this bug with any necessary supporting details.

We appreciate the feedback. However, this issue will not be addressed in the next version of WPF. Thank you.
–WPF Team.
Posted by Microsoft on 2/22/2013 at 4:20 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 2/20/2013 at 12:10 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 2/19/2013 at 11:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.