Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.57 KB

itextselection_homekey_234543261.md

File metadata and controls

33 lines (22 loc) · 1.57 KB
-api-id -api-type
M:Windows.UI.Text.ITextSelection.HomeKey(Windows.UI.Text.TextRangeUnit,System.Boolean)
winrt method

Windows.UI.Text.ITextSelection.HomeKey

-description

Moves the insertion point or the active end of the text selection to the home position, mimicking the functionality of the Home key.

-parameters

-param unit

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

-param extend

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.

-returns

The number of units that the insertion point or the active end is moved.

-remarks

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.

-examples

-see-also

ITextSelection.EndKey