[]
        
(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)
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)
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.