共用方式為


ITextRangeProvider.AddToSelection Method

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

Adds to the collection of highlighted text in a text container that supports multiple disjoint selections.

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

Syntax

'Declaration
Sub AddToSelection
void AddToSelection()

Exceptions

Exception Condition
InvalidOperationException

The text provider does not support multiple disjoint selections.

Remarks

The text insertion point moves to the area of the new selection.

Providing a degenerate text range moves the insertion point.

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.