Skip to main content

AlignedTitle.WordWrap Property

Gets or sets whether a title’s text should wrap when it’s too lengthy.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v22.2.dll

NuGet Package: DevExpress.Charts


public bool WordWrap { get; set; }

Property Value

Type Description

true, if a title’s text should wrap; otherwise, false.


Use the WordWrap property to enable automatic word wrapping for lengthy titles.

After you enable the WordWrap property, the DockableTitle.MaximumLinesCount property is in effect, allowing you to determine the number of lines that will appear when a title’s text is wrapped. Note that if a title’s length exceeds this limit, the last line of text will be cut off.

The following images demonstrates how these properties work for chart titles.

WordWrap = false

WordWrap = true

MaximumLinesCount = 0

WordWrap = true

MaximumLinesCount = 2





This example demonstrates how word-wrapping can be enabled for chart titles at runtime. In addition, you can determine the maximum number of lines in which a title is allowed to wrap.

// Create a title and add it to the chart's collection.
ChartTitle chartTitle1 = new ChartTitle();
chartTitle1.Text = "Just a Very Lengthy Title for Such a Small Chart";

// Enable word-wrapping for the title,
// and define a limit for its lines.
chartTitle1.WordWrap = true;
chartTitle1.MaxLineCount = 2;

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the WordWrap property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also