ITextProvider.RangeFromChild Method

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

Namespace:  System.Windows.Automation.Provider
Assembly:  System.Windows (in System.Windows.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.

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.

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

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

Community Additions

ADD
Show: