TextBlock.SelectedText 屬性

定義

取得選取文字的文字範圍。

public:
 property Platform::String ^ SelectedText { Platform::String ^ get(); };
winrt::hstring SelectedText();
public string SelectedText { get; }
var string = textBlock.selectedText;
Public ReadOnly Property SelectedText As String

屬性值

String

Platform::String

winrt::hstring

所選取文字的文字範圍。

備註

重要

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

適用於