Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ITextRangeProvider.ExpandToEnclosingUnit Method

Expands the text range to the specified text unit.

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

void ExpandToEnclosingUnit(
	TextUnit unit


Type: System.Windows.Automation.Text.TextUnit
The textual unit.

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:


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

© 2015 Microsoft