-api-id | -api-type |
---|---|
M:Windows.UI.Text.ITextSelection.HomeKey(Windows.UI.Text.TextRangeUnit,System.Boolean) |
winrt method |
Moves the insertion point or the active end of the text selection to the home position, mimicking the functionality of the Home key.
The units by which to move the insertion point or active end. The following values are valid.
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.
The number of units that the insertion point or the active end is moved.
The HomeKey method is a logical method rather than a directional method and so is dependent on the language that is involved. For example, in Arabic text, HomeKey moves to the right end of a line, whereas in English text, it moves to the left. Thus HomeKey is different from the ITextSelection.MoveRight or ITextSelection.MoveLeft methods. HomeKey also differs from the ITextRange.StartOf method in that it extends from the active end, whereas StartOf extends from the start position.