Spread WPF 18
GrapeCity.Wpf.SpreadSheet.CellType.Editors Namespace / GcTextBox Class / MaxLength Property


In This Topic
    MaxLength Property (GcTextBox)
    In This Topic
    Gets or sets the maximum number of characters or bytes that the control can hold. This is a dependency property.
    Syntax
    'Declaration
     
    Public Property MaxLength As Integer
    'Usage
     
    Dim instance As GcTextBox
    Dim value As Integer
     
    instance.MaxLength = value
     
    value = instance.MaxLength
    public int MaxLength {get; set;}

    Property Value

    The number of characters or bytes determined by the MaxLengthUnit property. That can be entered into the control.
    The default is zero.
    Exceptions
    ExceptionDescription
    Assigned value is less than zero.
    Remarks
    The MaxLength property allows you to limit the number of characters an user can enter in the control. The default value will be set to 0, which will not limit any amount of characters. Any number greater than 0 indicates the maximum number of characters. And the MaxLengthUnit will take effect the display result with this MaxLength property.
    See Also