We have an application in which I need to click on a Pane. I tried to use the following code, which I use to click on a button, but it gave Unsupported pattern exception.
InvokePattern click_pattern = (InvokePattern)adjust_button.GetCurrentPattern(InvokePattern.Pattern);
click_pattern.Invoke();
Is there any other way to do it?
Even though the object is clickable, depending on how the click is being handled internally, you may not necessarily be able to use the InvokePattern to perform a click. That appears to be the case here.
As an alternative, you can use some code to move the mouse cursor over the pane and issue a click using P/Invoke. Something like this: