ITextRangeProvider.ExpandToEnclosingUnit Method

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

Expands the text range to the specified text unit.

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

Syntax

'Declaration
Sub ExpandToEnclosingUnit ( _
    unit As TextUnit _
)
void ExpandToEnclosingUnit(
    TextUnit unit
)

Parameters

Remarks

If the range is already an exact quantity of the specified units, the range remains unchanged.

If the specified TextUnit is not supported by the control, the ExpandToEnclosingUnit method defers to the next largest supported TextUnit.

The order, from smallest text unit to the largest, is as follows:

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.