TextWrapping 枚举

定义

指定文本在到达包含框的边缘时是否换行。Specifies whether text wraps when it reaches the edge of the containing box.

public enum class TextWrapping
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public enum TextWrapping
type TextWrapping = 
Public Enum TextWrapping
继承
TextWrapping
属性

字段

NoWrap 1

不执行换行。No line wrapping is performed.

Wrap 2

如果行溢出可用块宽度,即使标准换行算法不能确定换行时机,例如超长单词限制于固定宽度容器中而不允许滚动时,也将发生换行。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 0

如果行溢出可用块宽度,则将发生换行。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.

示例

下面的示例演示如何设置 @no__t 的 @no__t 的属性的值。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;
}
Private Sub wrapOff(ByVal sender As Object, ByVal e As RoutedEventArgs)
    myTextBox.TextWrapping = TextWrapping.NoWrap
End Sub

适用于