IRawElementProviderHwndOverride.GetOverrideProviderForHwnd Method (IntPtr)


Retrieves a UI automation provider for the specified element.

Namespace:   System.Windows.Automation.Provider
Assembly:  UIAutomationProvider (in UIAutomationProvider.dll)

IRawElementProviderSimple GetOverrideProviderForHwnd(
	IntPtr hwnd


Type: System.IntPtr

The window handle of the element.

Return Value

Type: System.Windows.Automation.Provider.IRawElementProviderSimple

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

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.

.NET Framework
Available since 3.0
Return to top