Export (0) Print
Expand All
Expand Minimize

TextWrapping Enumeration

Specifies whether text wraps when it reaches the edge of the containing box

Namespace: System.Windows
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)] 
public enum TextWrapping
/** @attribute LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable) */ 
public enum TextWrapping
LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable) 
public enum TextWrapping
<object property="EnumerationValue" .../>

 Member nameDescription
NoWrap No line wrapping is performed.  
Wrap Line-breaking occurs if the line overflows beyond the available block width, even if the standard line breaking algorithm cannot determine any line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.  
WrapWithOverflow Line-breaking occurs if the line overflows beyond the available block width. However, a line may overflow beyond the block width if the line breaking algorithm cannot determine a line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.  

The following example demonstrates how to set the value of the TextWrapping property of a TextBox.

private void wrapOff(object sender, RoutedEventArgs e)
{
    myTextBox.TextWrapping = TextWrapping.NoWrap;
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft