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


In This Topic
    MaxLines Property
    In This Topic
    Gets or sets the maximum number of visible lines. This is a dependency property.
    Syntax
    'Declaration
     
    Public Property MaxLines As Integer
    'Usage
     
    Dim instance As GcTextBox
    Dim value As Integer
     
    instance.MaxLines = value
     
    value = instance.MaxLines
    public int MaxLines {get; set;}

    Property Value

    The maximum number of visible lines. The default is System.Int32.MaxValue.
    Exceptions
    ExceptionDescription
    MaxLines is less than MinLines.
    Remarks

    Getting this property returns the current value of MaxLines. Setting this property causes the text box to resize if the number of visible lines exceeds the limit specified by MaxLines.

    This property applies only to visible lines, and does not constrain the actual number of lines. Depending on its configuration, a text box may contain additional non-visible lines that are accessible by scrolling.

    If the System.Windows.FrameworkElement.Height property is explicitly set on a GcTextBox, the MaxLines and MinLines property values are ignored.

    See Also