RangeFromChild Method
Collapse the table of content
Expand the table of content

TextPattern::RangeFromChild Method (AutomationElement^)

 

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

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

public:
TextPatternRange^ RangeFromChild(
	AutomationElement^ childElement
)

Parameters

childElement
Type: System.Windows.Automation::AutomationElement^

The enclosed object.

Return Value

Type: System.Windows.Automation.Text::TextPatternRange^

A range that spans the child element.

Exception Condition
ArgumentNullException

The child element is null.

InvalidOperationException

The element is not 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.

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft