Share via


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) 。

適用於