ITextProvider.RangeFromChild Method (IRawElementProviderSimple)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Retrieves a text range enclosing a child element such as an image, hyperlink, or other embedded object.

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

ITextRangeProvider RangeFromChild(
	IRawElementProviderSimple childElement
)

Parameters

childElement
Type: System.Windows.Automation.Provider.IRawElementProviderSimple

The enclosed object.

Return Value

Type: System.Windows.Automation.Provider.ITextRangeProvider

A range that spans the child element.

Exception Condition
ArgumentException

If the child element is a null reference (Nothing in Microsoft Visual Basic .NET).

A UI Automation provider should check that the passed element is a child of the text container.

If there is no text in the range where the child element exists, a degenerate (empty) range is returned.

The childElement parameter is either a child of the AutomationElement associated with a TextPattern or from the array of children of a TextPatternRange.

.NET Framework
Available since 3.0
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show: