Export (0) Print
Expand All
Expand Minimize

AutomationPeer.GetHostRawElementProviderCore Method

Tells UI Automation where in the UI Automation tree to place the hwnd being hosted by a Windows Presentation Foundation (WPF) element.

Namespace:  System.Windows.Automation.Peers
Assembly:  PresentationCore (in PresentationCore.dll)

protected virtual HostedWindowWrapper GetHostRawElementProviderCore()

Return Value

Type: System.Windows.Automation.Peers.HostedWindowWrapper
This method returns the hosted hwnd to UI Automation for controls that host hwnd objects.

This method returns the hosted hwnd to UI Automation for controls that host hwnd objects.

The AutomationPeer that is associated with an element that immediately hosts an hwnd must override this method.

If this method is not overridden, UI Automation places the hwnd as a child element of the HwndSource that hosts the whole application. Typically, you want to override this default behavior and set UI Automation to position the hosted hwnd parallel to the place where it is located in the Windows Presentation Foundation (WPF) logical tree.

Except in hosting scenarios, do not allow AutomationPeer types to override this method.

In addition to overriding this method, the AutomationPeer types that are associated with an element that immediately hosts an hwnd must return the AutomationPeer that is cast to IRawElementProviderSimple in response to WM_GETOBJECT coming to the hosted hwnd.

To get a pointer to IRawElementProviderSimple, call HostProviderFromHandle.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft