ITextRangeProvider.ExpandToEnclosingUnit Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Expands the text range to the specified text unit.

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

Syntax

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

ITextRangeProvider Interface

System.Windows.Automation.Provider Namespace