Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize

TextWrapping

Silverlight

Gets or sets a value that indicates how a text container should wrap text.

<object TextWrapping="TextWrapping"  .../>
value = object.TextWrapping
object.TextWrapping = value

Type: TextWrapping Enumeration

One of the enumeration values that indicates how the object should wrap text.

This property is read/write. The default value is NoWrap.

The TextWrapping property indicates how text should wrap in a text container. The TextWrapping enumeration defines two values: NoWrap and Wrap.

ActualHeight and ActualWidth are read-only properties that report the rendered height and width of the TextBlock; these properties can be different from the Height and Width properties of the TextBlock.

The following XAML example shows how to set the TextWrapping property to NoWrap and Wrap.

<!-- TextBlock with no text wrapping -->
<TextBlock
  Text="The quick red fox jumped over the lazy brown dog."
  Width="200"
  TextWrapping="NoWrap" />

<!-- TextBlock with text wrapping -->
<TextBlock
  Canvas.Top="40"
  Text="The quick red fox jumped over the lazy brown dog."
  Width="200"
  TextWrapping="Wrap" />

TextBlock, TextBox (Silverlight 2)

Community Additions

ADD
Show:
© 2014 Microsoft