Modifica

Condividi tramite


IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr) Method

Definition

Retrieves a UI automation provider for the specified element.

public:
 System::Windows::Automation::Provider::IRawElementProviderSimple ^ GetOverrideProviderForHwnd(IntPtr hwnd);
public System.Windows.Automation.Provider.IRawElementProviderSimple GetOverrideProviderForHwnd (IntPtr hwnd);
abstract member GetOverrideProviderForHwnd : nativeint -> System.Windows.Automation.Provider.IRawElementProviderSimple
Public Function GetOverrideProviderForHwnd (hwnd As IntPtr) As IRawElementProviderSimple

Parameters

hwnd
IntPtr

nativeint

The window handle of the element.

Returns

The provider for the specified element, or a null reference (Nothing in Visual Basic) if the element's default provider is not being overridden.

Remarks

This method is implemented by client-side UI Automation providers for fragment roots in fragments that contain window-based child elements, when the HWNDs of those child elements are not logically positioned within the UI Automation tree. For more information, see Non-WPF Provider Reparenting and Non-WPF Provider Repositioning in the Server-Side UI Automation Provider Implementation topic.

The returned provider must be part of the fragment tree. It can supply additional properties or override properties of the specified component.

If the returned provider implements IRawElementProviderFragment, the provider should be part of the fragment's tree and be reachable by navigating from the fragment's root.

Applies to

See also