Because it was a button with a function that changes the color each time the button was pressed, which was created by the developer of an existing program, it seems that there is no way to do it even with the method implemented via thexxxAutomationPeer
object did.
Results of investigation on the other side
{Binding SomeCommand}
is defined inICommand
Since the containedUserControl
was found to have a property that returns aICommand
object, it uses the resulting object toICommand.Execute ()
, you can get the behavior I wanted to do.
The characters areexisting program
andcreation program
.
Existing program
is a WPF app.
Create program
is a form app.
Created program
refers toexisting program
dynamically and is started in a separate thread.
The purpose ofCreate Program
is to automatically complete a certain procedure by operatingExisting Program
.
Here,
onexisting program
defines a click event There are controls.
On the other hand, I want to execute event processing at the time of clicking fromcreation program
.is what I want to do.
ButtonAutomationPeer I know, but the target control is notButton
.
The source code cannot be presented for this question.
The reason is
- The source code is confidential
- Never developed a WPF app
- In order to reproduce the situation accurately, you need to create a UserControl or generate a control dynamically in it, so you can't prepare immediately
.
I understand that it is difficult to get a specific solution because of these questions.
I would be grateful if you could give me the wisdom, "What should I do?"
Please provide more detailed information here.
- Visual Studio 2015 SP1
- Windows 7 64bit
-
Answer # 1
Related articles
- c # - how to call while keeping the control of the existing form
- [c #] program to click the mouse pointer
- c # - unity about camera control i want to zoom with mouse scroll
- c # - rewrite task in existing code to unitask
- c # - i want one script to control multiple objects
- c # - in the service program of windows, check the life and the status of the task that has an infinite loop
- c # - i want to write to a textbox asynchronously when i click the wpf button
- c # - i want to place a control inside a control that has already been placed with style
- c # - please tell me the control mascot of cefsharp
- c # - i want to get multiple control names (serial numbers) dynamically
- class design for exclusive control of multi-process applications in c #
- c # - rotation control of 3d game objects in unity
- c # - i want to control a text box on another form, but i can't
- c # - cannot control user control from main form
- c # - i want the dragged graphics to pass over the control
- c # - i want to control the transition of animation with a script
- centos - git clone existing rails program and get bundle install error
- c # you tried to load a program with the wrong format
- how to specify c # program display name
- c # - i want to control enable/disable of button using reactiveproperty and reactivecollection
- c # - i want to rotate an object such as picturebox with animation
- c # - visualstudio2019:enclose the selection in parentheses
- c # - the button of the external process cannot be clicked by the handle operation
- c # - is there a recommended book that even beginners can understand?
- (c #) i want to avoid heavy image continuous drawing of picturebox
- c # - get variable values from aspnet code-behind
- i want to open by specifying the pdf page with process in visual studio 2019 c # form
- c # excel printing
- i want to dynamically set the where condition of linq in c # visual studio2019 ??
- c # - read csv file operation
Is it a content that can be handled by AutomationPeer other than
Button?
System.Windows.Automation.Peers
Pattern list supported by each Control is here.
Control Pattern Mapping for UI Automation Clients