IWindowProvider IWindowProvider IWindowProvider Interface

Definition

Exposes methods and properties to support access by a Microsoft UI Automation client to controls that provide fundamental window-based functionality within a traditional graphical user interface (GUI). Implement this interface in order to support the capabilities that an automation client requests with a GetPattern(PatternInterface) call and PatternInterface.

public interface IWindowProviderpublic interface IWindowProviderPublic Interface IWindowProvider
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For more info on what this pattern is for, see Window Control Pattern.

IWindowProvider isn't implemented by any existing Windows Runtime automation peers. The interface exists so that custom control authors can support the automation pattern in a custom control, and implement their automation support using the same Windows Runtime managed or C++ API as they use to define control logic or other automation support.

Use WindowPatternIdentifiers if you want to reference the IWindowProvider pattern properties from control code when you fire automation events or call RaisePropertyChangedEvent(AutomationProperty, Object, Object).

Properties

InteractionState InteractionState InteractionState InteractionState

Gets the interaction state of the window.

public WindowInteractionState InteractionState { get; }public WindowInteractionState InteractionState { get; }Public ReadOnly Property InteractionState As WindowInteractionStatepublic WindowInteractionState InteractionState { get; }
Value
WindowInteractionState WindowInteractionState WindowInteractionState

The interaction state of the control, as a value of the enumeration.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

IsModal IsModal IsModal IsModal

Gets a value that specifies whether the window is modal.

public bool IsModal { get; }public bool IsModal { get; }Public ReadOnly Property IsModal As boolpublic bool IsModal { get; }
Value
bool bool bool

true if the window is modal; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

IsTopmost IsTopmost IsTopmost IsTopmost

Gets a value that specifies whether the window is the topmost element in the z-order of layout.

public bool IsTopmost { get; }public bool IsTopmost { get; }Public ReadOnly Property IsTopmost As boolpublic bool IsTopmost { get; }
Value
bool bool bool

true if the window is topmost; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Maximizable Maximizable Maximizable Maximizable

Gets a value that specifies whether the window can be maximized.

public bool Maximizable { get; }public bool Maximizable { get; }Public ReadOnly Property Maximizable As boolpublic bool Maximizable { get; }
Value
bool bool bool

true if the window can be maximized; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Minimizable Minimizable Minimizable Minimizable

Gets a value that specifies whether the window can be minimized.

public bool Minimizable { get; }public bool Minimizable { get; }Public ReadOnly Property Minimizable As boolpublic bool Minimizable { get; }
Value
bool bool bool

true if the window can be minimized; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

VisualState VisualState VisualState VisualState

Gets the visual state of the window.

public WindowVisualState VisualState { get; }public WindowVisualState VisualState { get; }Public ReadOnly Property VisualState As WindowVisualStatepublic WindowVisualState VisualState { get; }
Value
WindowVisualState WindowVisualState WindowVisualState

The visual state of the window, as a value of the enumeration.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

Close() Close() Close() Close()

Closes the window.

public void Close()public void Close()Public Function Close() As voidpublic void Close()
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

SetVisualState(WindowVisualState) SetVisualState(WindowVisualState) SetVisualState(WindowVisualState) SetVisualState(WindowVisualState)

Changes the visual state of the window (such as minimizing or maximizing it).

public void SetVisualState(WindowVisualState state)public void SetVisualState(WindowVisualState state)Public Function SetVisualState(state As WindowVisualState) As voidpublic void SetVisualState(WindowVisualState state)
Parameters
state
WindowVisualState WindowVisualState WindowVisualState

The visual state of the window to change to, as a value of the enumeration.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

WaitForInputIdle(Int32) WaitForInputIdle(Int32) WaitForInputIdle(Int32) WaitForInputIdle(Int32)

Blocks the calling code for the specified time or until the associated process enters an idle state, whichever completes first.

public bool WaitForInputIdle(Int32 milliseconds)public bool WaitForInputIdle(Int32 milliseconds)Public Function WaitForInputIdle(milliseconds As Int32) As boolpublic bool WaitForInputIdle(Int32 milliseconds)
Parameters
milliseconds
System.Int32 System.Int32 System.Int32

The amount of time, in milliseconds, to wait for the associated process to become idle.

Returns
bool bool bool

true if the window has entered the idle state; false if the timeout occurred.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)