TextBox.TextWrapping property

This topic has not yet been rated - Rate this topic

Gets or sets how line breaking occurs if a line of text extends beyond the available width of the text box.

Syntax


public TextWrapping TextWrapping { get; set; }


<TextBlock TextWrapping="Wrap"/>
-or-
<TextBlock TextWrapping="NoWrap"/>

Property value

Type: TextWrapping

One of the TextWrapping values. The default is NoWrap.

Examples

The following example shows how you can use the TextWrapping property in XAML.


<StackPanel>
    <TextBox Text="A text box that demonstrates TextWrapping, TextAlignment, MaxLength, and AcceptsReturn"  
             TextWrapping="Wrap" TextAlignment="Center" 
             MaxLength="500" AcceptsReturn="True" 
             Margin="20,20,0,0" Width="300" Height="50"/>
</StackPanel>


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

TextBox

 

 

Build date: 3/12/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.