TextBox.SelectedText Property

Definition

Gets or sets the content of the current selection in the text box.

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"/>

Property Value

String

Platform::String

winrt::hstring

The currently selected text in the text box. If no text is selected, the value is String.Empty.

Applies to