ITextRangeProvider.CompareEndpoints Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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

Syntax

Function CompareEndpoints ( _
    endpoint As TextPatternRangeEndpoint, _
    targetRange As ITextRangeProvider, _
    targetEndpoint As TextPatternRangeEndpoint _
) As Integer
int CompareEndpoints(
    TextPatternRangeEndpoint endpoint,
    ITextRangeProvider targetRange,
    TextPatternRangeEndpoint targetEndpoint
)

Parameters

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.

Exceptions

Exception Condition
ArgumentException

The targetRange is from a different text provider.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

ITextRangeProvider Interface

System.Windows.Automation.Provider Namespace