Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation namespace. For the latest information about UI Automation, see Windows Automation API: UI Automation.
This topic introduces guidelines and conventions for implementing IWindowProvider, including information about WindowPattern properties, methods, and events. Links to additional references are listed at the end of the topic.
The WindowPattern control pattern is used to support controls that provide fundamental window-based functionality within a traditional graphical user interface (GUI). Examples of controls that must implement this control pattern include top-level application windows, multiple-document interface (MDI) child windows, resizable split pane controls, modal dialogs and balloon help windows.
When implementing the Window control pattern, note the following guidelines and conventions:
To support the ability to modify both window size and screen position using UI Automation, a control must implement ITransformProvider in addition to IWindowProvider.
Controls that contain title bars and title bar elements that enable the control to be moved, resized, maximized, minimized, or closed are typically required to implement IWindowProvider.
Controls such as tooltip pop-ups and combo box or menu drop-downs do not typically implement IWindowProvider.
Balloon help windows are differentiated from basic tooltip pop-ups by the provision of a window-like Close button.
Full-screen mode is not supported by IWindowProvider as it is feature-specific to an application and is not typical window behavior.
The following properties, methods, and events are required for the IWindowProvider interface.
Required member | Member type | Notes |
---|---|---|
InteractionState | Property | None |
IsModal | Property | None |
IsTopmost | Property | None |
Maximizable | Property | None |
Minimizable | Property | None |
VisualState | Property | None |
Close | Method | None |
SetVisualState | Method | None |
WaitForInputIdle | Method | None |
WindowClosedEvent | Event | None |
WindowOpenedEvent | Event | None |
WindowInteractionState | Event | Is not guaranteed to be ReadyForUserInteraction |
Providers must throw the following exceptions.
Exception type | Condition |
---|---|
InvalidOperationException | SetVisualState - When a control does not support a requested behavior. |
ArgumentOutOfRangeException | WaitForInputIdle - When the parameter is not a valid number. |
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Use Power Automate for desktop to interact with windows and applications - Training
Learn how Power Automate for desktop identifies and interacts with UI elements and windows.
Certification
Microsoft Certified: Power Automate RPA Developer Associate - Certifications
Demonstrate how to improve and automate workflows with Microsoft Power Automate RPA developer.
Documentation
Implementing the UI Automation Selection Control Pattern - .NET Framework
Review guidelines and conventions for implementing the Selection control pattern in UI Automation. See required members for the ISelectionProvider interface.
Implementing the UI Automation Invoke Control Pattern - .NET Framework
Read guidelines and conventions to implement the Invoke control pattern in UI Automation. See required members for the IInvokeProvider interface.
UI Automation Control Patterns for Clients - .NET Framework
Read an overview about control patterns for UI Automation clients. Use control patterns to access information about the user interface (UI).