語言

TextBox.SelectedText 屬性

定義

在文字框中取得或設定目前選擇的內容。

public:
 property Platform::String ^ SelectedText { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring SelectedText();

void SelectedText(winrt::hstring value);
public string SelectedText { get; set; }
var string = textBox.selectedText;
textBox.selectedText = string;
Public Property SelectedText As String
<TextBox SelectedText="string"/>

屬性值

String

Platform::String

winrt::hstring

目前在文字框中選取的文字。 若未選取任何文字,則該值為 String.Empty。

適用於