[]
        
(Showing Draft Content)

C1.WPF.RichTextBox.Documents.C1TextPointer.Closest

Closest Method

Closest(Func<C1TextPointer, bool>, Func<C1TextPointer, C1TextPointer, int>, C1TextElement)

Returns the closest position that satisfies a predicate.

Declaration
public C1TextPointer Closest(Func<C1TextPointer, bool> predicate, Func<C1TextPointer, C1TextPointer, int> distance, C1TextElement range)
Public Function Closest(predicate As Func(Of C1TextPointer, Boolean), distance As Func(Of C1TextPointer, C1TextPointer, Integer), range As C1TextElement) As C1TextPointer
Parameters
Type Name Description
Func<C1TextPointer, bool> predicate

The predicate that must be satisfied.

Func<C1TextPointer, C1TextPointer, int> distance

A distance function.

C1TextElement range

The range to be searched in.

Returns
Type Description
C1TextPointer

The closest position that satisfies the predicate.

Closest(Func<C1TextPointer, bool>, Func<C1TextPointer, C1TextPointer, int>)

Returns the closest position that satisfies a predicate.

Declaration
public C1TextPointer Closest(Func<C1TextPointer, bool> predicate, Func<C1TextPointer, C1TextPointer, int> distance)
Public Function Closest(predicate As Func(Of C1TextPointer, Boolean), distance As Func(Of C1TextPointer, C1TextPointer, Integer)) As C1TextPointer
Parameters
Type Name Description
Func<C1TextPointer, bool> predicate

The predicate that must be satisfied.

Func<C1TextPointer, C1TextPointer, int> distance

A distance function.

Returns
Type Description
C1TextPointer

The closest position that satisfies the predicate.