Back to Devexpress

TextOptions.WordWrap Property

windowsforms-devexpress-dot-utils-dot-textoptions.md

latest4.1 KB
Original Source

TextOptions.WordWrap Property

Gets or sets text wrapping mode.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[DefaultValue(WordWrap.Default)]
[XtraSerializableProperty]
public virtual WordWrap WordWrap { get; set; }
vb
<DefaultValue(WordWrap.Default)>
<XtraSerializableProperty>
Public Overridable Property WordWrap As WordWrap

Property Value

TypeDefaultDescription
WordWrapDefault

A WordWrap value that specifies text wrapping mode.

|

Available values:

NameDescription
Default

Default wrapping mode. The actual wrapping mode is determined by a control.

| | NoWrap |

The word wrapping feature is disabled.

| | Wrap |

The word wrapping feature is enabled.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to WordWrap
AppearanceObject

.TextOptions .WordWrap

| | TextOptions |

.DefaultOptions .WordWrap

| | TextOptions |

.DefaultOptionsCenteredWithEllipsis .WordWrap

| | TextOptions |

.DefaultOptionsMultiLine .WordWrap

| | TextOptions |

.DefaultOptionsNoWrap .WordWrap

| | TextOptions |

.DefaultOptionsNoWrapEx .WordWrap

|

Remarks

Any string is displayed on-screen within a specific rectangle. When text wrapping is enabled the string wraps at the right edge of the rectangle, otherwise the string is displayed in a single line. The TextOptions.Trimming property specifies how the string is rendered when it doesn’t completely fit into the rectangle.

When an AppearanceObject’s style setting (for example, BackColor , ForeColor , Font and TextOptions.HAlignment ) is set to a non-default value, the corresponding Options.Use… option (for instance, Options.UseBackColor , Options.UseForeColor , Options.UseFont and Options.UseTextOptions ) is automatically set to true in the following cases:

  • The AppearanceObject belongs to a control/component (or its element), and this control/component has been completely loaded (see the control’s IsLoading property to check the load status);
  • The AppearanceObject belongs to a grid column/band or tree list column/band, and the column/band belongs to a grid/tree list control;
  • The AppearanceObject is standalone, that is, it does not belong to any control or component.

In other cases, the Options.Use… options are not automatically enabled. You may need to enable these options manually for the style settings to be in effect.

See Also

HAlignment

Trimming

VAlignment

TextOptions Class

TextOptions Members

DevExpress.Utils Namespace