Delen via


RichEditTextRange.SetIndex(TextRangeUnit, Int32, Boolean) Method

Definition

Moves the text range to the specified unit of the story.

public:
 virtual void SetIndex(TextRangeUnit unit, int index, bool extend) = SetIndex;
void SetIndex(TextRangeUnit const& unit, int const& index, bool const& extend);
public void SetIndex(TextRangeUnit unit, int index, bool extend);
function setIndex(unit, index, extend)
Public Sub SetIndex (unit As TextRangeUnit, index As Integer, extend As Boolean)

Parameters

unit
TextRangeUnit

The unit used to move the text range.

index
Int32

int

The index of the specified unit. The text range is relocated to the unit that has this index. If unit is positive, the numbering of units begins at the start of the story and proceeds forward. If negative, the numbering begins at the end of the story and proceeds backward. The start of the story corresponds to index = 1 for all existing units, and the last unit in the story corresponds to index = – 1.

extend
Boolean

bool

Indicates how to change the text range. True extends the text range to include the unit by moving only the end position of the text range. False collapses the text range to an insertion point and then moves the insertion point. The default value is false.

Implements

M:Windows.UI.Text.ITextRange.SetIndex(Windows.UI.Text.TextRangeUnit,System.Int32,System.Boolean) M:Windows.UI.Text.ITextRange.SetIndex(Windows.UI.Text.TextRangeUnit,int,bool)

Applies to