Share via


MaxLength

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

Gets or sets the value that determines the maximum number of characters that are allowed for user input.

<object MaxLength="int" .../>
value = object.MaxLength
object.MaxLength = value

Property Value

Type: int

The maximum number of characters that are allowed for user input.

This property is read/write. The default is 0, which evaluates to no constraint.

Applies To

PasswordBox

TextBox

Version Information

Silverlight 2