TextPatternRange.RemoveFromSelection Method ()

 

Removes a highlighted section of text, corresponding to the calling text range Start and End endpoints, from an existing collection of highlighted text in a text container that supports multiple, disjoint selections.

Namespace:   System.Windows.Automation.Text
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

public void RemoveFromSelection()

Exception Condition
InvalidOperationException

If text provider does not support multiple, disjoint selections (for example, SupportedTextSelection must have a value of Multiple).

The text insertion point will move to the area of the removed highlight.

Providing a degenerate text range will move the insertion point.

.NET Framework
Available since 3.0
Return to top
Show: