TextBlock.SelectionStart 屬性

定義

取得 TextBlock中選取之文字的開始位置。

public:
 property TextPointer ^ SelectionStart { TextPointer ^ get(); };
TextPointer SelectionStart();
public TextPointer SelectionStart { get; }
var textPointer = textBlock.selectionStart;
Public ReadOnly Property SelectionStart As TextPointer

屬性值

物件,表示選取範圍開始,如果沒有選取範圍,則為 null。

備註

使用 [選取 ] 來設定選取範圍的開始和結束。

重要

如果使用鍵盤在 TextBlock 內選取文字,使用者必須先在前景啟動插入 號流覽 (,然後按 F7) 。

適用於