ITextRangeProvider.GetEnclosingElement Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns the innermost element that encloses the text range.

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

Syntax

'Declaration
Function GetEnclosingElement As IRawElementProviderSimple
IRawElementProviderSimple GetEnclosingElement()

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.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.