Поделиться через


ITextProvider.RangeFromChild Method

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

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)

Syntax

'Declaration
Function RangeFromChild ( _
    childElement As IRawElementProviderSimple _
) As ITextRangeProvider
ITextRangeProvider RangeFromChild(
    IRawElementProviderSimple childElement
)

Parameters

Return Value

Type: System.Windows.Automation.Provider.ITextRangeProvider
A range that spans the child element.

Remarks

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.

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.