0

We are running a custom process injection into a WPF Process, and enable named pipe between process to communicate. I want to disable the mainwindows until I complete my injection process.

I am using UIAutomation Libraries to check wpf window properties. AutomationElement gives a method to check property value via GetCurrentValue of the property.

What is the equivalent of the SetCurrentValue method so that I can set the IsEnabledProperty?

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72

1 Answers1

0

I'm pretty sure there isn't a ControlPattern that allows you to disable a control. Keep in mind that the UIAutomation library is primarily intended for black-box style testing, so there isn't much capability in there that interacts with controls in ways an end user wouldn't be able to.

If the UIA library is your only means of performing this test, you might want to investigate custom control patterns as a possible means of getting around it. The downside here is that it violates black-box principles to some extent, and will mean additional work for the developers.

Chaser324
  • 478
  • 2
  • 12