GetEnclosingElement Method

ITextRangeProvider.GetEnclosingElement Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns the innermost element that encloses the text range.

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

'Declaration
Function GetEnclosingElement As IRawElementProviderSimple

Return Value

Type: System.Windows.Automation.Provider.IRawElementProviderSimple
The enclosing control, typically the text provider that provides the text range. However, if the text provider supports child text elements such as tables or hyperlinks, the enclosing element can be a descendant of the text provider.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft