Jaa


RichEditTextRange.EndOf(TextRangeUnit, Boolean) Method

Definition

Moves or extends the text range to the end of the nearest specified text unit. The text range is moved or extended forward in the document.

public:
 virtual int EndOf(TextRangeUnit unit, bool extend) = EndOf;
int EndOf(TextRangeUnit const& unit, bool const& extend);
public int EndOf(TextRangeUnit unit, bool extend);
function endOf(unit, extend)
Public Function EndOf (unit As TextRangeUnit, extend As Boolean) As Integer

Parameters

unit
TextRangeUnit

The unit by which to move the end position of the text range.

extend
Boolean

bool

true to extend the text range by moving just the end position of the range to the end of the specified unit. false to move both ends of the text range to the end of the specified unit. The default is false.

Returns

Int32

int

The number of character positions that the range was moved or extended, plus 1 if the text range collapsed to the start of the range. If the text range includes the final carriage return (CR) at the end of the story, and extend is false, the return value is set to –1 to indicate that the collapse occurred before the end of the range. This is because an insertion point cannot exist beyond the final CR.

Implements

M:Windows.UI.Text.ITextRange.EndOf(Windows.UI.Text.TextRangeUnit,System.Boolean) M:Windows.UI.Text.ITextRange.EndOf(Windows.UI.Text.TextRangeUnit,bool)

Applies to