Condividi tramite


SelectedText

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

<object SelectedText="string" .../>
value = object.SelectedText
object.SelectedText = value

Property Value

Type: string

The currently selected text in the text box. If no text is selected, the value is an empty string.

This property is read/write. The default is empty string.

Managed Equivalent

SelectedText

Remarks

The SelectedText property can be used to replace the selected text or to insert new text at the caret location if no text is selected. Setting this property raises the SelectionChanged event.

Applies To

TextBox

Version Information

Silverlight 2