GetEnclosingElement Method

ITextRangeProvider.GetEnclosingElement Method ()


Returns the innermost control that encloses the text range.

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

IRawElementProviderSimple GetEnclosingElement()

Return Value

Type: System.Windows.Automation.Provider.IRawElementProviderSimple

The enclosing control, typically the text provider that supplies the text range. However, if the text provider supports child elements such as tables or hyperlinks, then the enclosing element could be a descendant of the text provider.

.NET Framework
Available since 3.0
Available since 4.0
Windows Phone Silverlight
Available since 7.1
Return to top
© 2015 Microsoft