TextBox::MinLines Property
.NET Framework (current version)
Gets or sets the minimum number of visible lines.
Assembly: PresentationFramework (in PresentationFramework.dll)
Getting this property returns the current value of MinLines. Setting this property causes the text box to resize if the number of visible lines is less than value specified by MinLines.
If the Height property is explicitly set on a TextBox, the MaxLines and MinLines property values are ignored.
Identifier field | |
Metadata properties set to true |
The following example shows how to create a TextBox with a MinLines value of 1.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <StackPanel> <TextBox Text="Initial text in TextBox" Width="200" TextAlignment="Center" TextWrapping="Wrap" MaxLength="500" MinLines="1" MaxLines="5" /> </StackPanel> </Page>
.NET Framework
Available since 3.0
Available since 3.0
Show: