FindMatchingControls API returns empty list when we check on the WPF application topwindow - by Nagasree

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 790300 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 6/17/2013 2:25:38 AM
Access Restriction Public


     Iam using  CUIT 'FindMatchingControls' on the WPF application topwindow and checking the 'Exists' property before performing action on the control to make sure that iam performing action on the correct instance of the control when there are more than one instance of application.

   But FindMatchingControls returning empty list even one/more instances are  present and then Exists property returning 'FALSE'.Exists property return false only after using FindMatchingControls API .

We are seeing this issue in VS2010 mainly and we checked in VS2012 also.Here is the MSDN Forum link (
Sign in to post a comment.
Posted by Nagasree on 7/24/2013 at 4:46 AM

The workaround you suggested is not working as expected.It is giving the count including other technology main windows also.
Posted by Nagasree on 7/4/2013 at 11:56 PM

Sorry for the late reply.

In our test method we want to perform action on specific instance of the application if there are more than one running at that moment. To confirm that we get all instances ,compare the ProcessId ,and then perform action on the instance which we want to do

Posted by Microsoft on 6/26/2013 at 2:44 AM
Please also let us know of your scenario here. Why is FindMatchingControls of a top level window important?
Posted by Microsoft on 6/19/2013 at 4:01 AM
Thanks for your response.

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 Nagasree on 6/17/2013 at 10:30 PM

I submitted the Coded UI Test project and sample WPF application project.If we run the ordered test,we can see the issue.Still you need information let me know.

Posted by Microsoft on 6/17/2013 at 8:11 PM
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?

Please submit this information to us within 4 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 6/17/2013 at 2: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(