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

Gets or sets the number of characters in the current selection in the text box.

<TextBox SelectionLength="int" .../>
value = object.SelectionLength
object.SelectionLength = value

Property Value

Type: int

The number of characters in the current selection, or 0 if there is no selection.

This property is read/write. The default is 0.

Managed Equivalent


Applies To


Version Information

Silverlight 2