ITextRangeProvider.CompareEndpoints Method (TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

 

Returns a value that specifies whether two text ranges have identical endpoints.

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

int CompareEndpoints(
	TextPatternRangeEndpoint endpoint,
	ITextRangeProvider targetRange,
	TextPatternRangeEndpoint targetEndpoint
)

Parameters

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

The Start or End endpoint of the caller.

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

The target range for comparison.

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

The Start or End endpoint of the target.

Return Value

Type: System.Int32

Returns a negative value if the caller's endpoint occurs earlier in the text than the target endpoint.

Returns zero if the caller's endpoint is at the same location as the target endpoint.

Returns a positive value if the caller's endpoint occurs later in the text than the target endpoint.

Exception Condition
ArgumentException

If targetRange is from a different text provider.

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