ITextSelection.MoveRight method

Applies to Windows and Windows Phone

Moves the insertion point or the active end of the text selection to the right, mimicking the functionality of the Right Arrow key.

Syntax


int MoveRight(
  TextRangeUnit unit, 
  int count, 
  bool extend
)

Parameters

unit

Type: TextRangeUnit

The units by which to move the insertion point or active end. The following values are valid.

ValueCorresponding key combinationMeaning
CharacterRight ArrowMove one character position to the right. This is the default.
WordCtrl+Right ArrowMove one word to the right.

 

count

Type: System.Int32 [.NET] | int32 [C++]

The number of units to move. The default value is 1. If count is less than zero, movement is to the left.

extend

Type: System.Boolean [.NET] | Platform::Boolean [C++]

Indicates how to change the selection. True extends the selection by moving only the active end. False collapses the selection to an insertion point and then moves the insertion point. The default value is false.

Return value

Type: System.Int32 [.NET] | int32 [C++]

The number of units that the insertion point or active end moved. Collapsing the selection counts as one unit.

Remarks

A nonzero extend value corresponds to the Shift key being pressed in addition to the key combination described in unit.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Text
Windows::UI::Text [C++]

Metadata

Windows.winmd

See also

ITextSelection
ITextSelection.MoveLeft

 

 

Show:
© 2014 Microsoft