ITextRangeProvider.MoveEndpointByRange Method (TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

 

Moves one endpoint of a text range to the specified endpoint of a second text range.

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

void MoveEndpointByRange(
	TextPatternRangeEndpoint endpoint,
	ITextRangeProvider targetRange,
	TextPatternRangeEndpoint targetEndpoint
)

Parameters

endpoint
Type: System.Windows.Automation.Text.TextPatternRangeEndpoint

The endpoint to move.

targetRange
Type: System.Windows.Automation.Provider.ITextRangeProvider

Another range from the same text provider.

targetEndpoint
Type: System.Windows.Automation.Text.TextPatternRangeEndpoint

An endpoint on the other range.

If the endpoint being moved crosses the other endpoint of the same text range then that other endpoint is moved also, resulting in a degenerate range and ensuring the correct ordering of the endpoints (that is, Start is always less than or equal to End).

.NET Framework
Available since 3.0
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show: