xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrlabel-86364a9e.md
Gets or sets whether carriage return (CRLF) characters split the label’s text into multiple lines.
Namespace : DevExpress.XtraReports.UI
Assembly : DevExpress.XtraReports.v25.2.dll
NuGet Package : DevExpress.Reporting.Core
[DefaultValue(false)]
[SRCategory(ReportStringId.CatBehavior)]
public bool Multiline { get; set; }
<SRCategory(ReportStringId.CatBehavior)>
<DefaultValue(False)>
Public Property Multiline As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true , if carriage return (CRLF) characters split the label’s text into multiple lines ; otherwise, false.
|
Set this property’s value to true (process carriage returns) to display more than one line of text in an XRLabel control.
The following can be used as new line characters:
The code sample below illustrates how to display multiline text in an XRLabel control.
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
// ...
public XRLabel CreateLabel() {
// Create a new label object.
XRLabel label = new XRLabel();
// Enable the multiline content.
label.Multiline = true;
label.Text = "This text illustrates \r\nhow to use the XRLabel.Multiline property \r\nto display multiline content \r\nin a label.";
// Align the label's text to the middle.
label.TextAlignment = TextAlignment.MiddleCenter;
return label;
}
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraReports.UI
' ...
Public Function CreateLabel() As XRLabel
' Create a new label object.
Dim label As New XRLabel()
' Enable the multiline content.
label.Multiline = True
label.Text = "This text illustrates " & ControlChars.CrLf & "how to use the XRLabel.Multiline property " & ControlChars.CrLf & "to display multiline content " & ControlChars.CrLf & "in a label."
' Align the label's text to the middle.
label.TextAlignment = TextAlignment.MiddleCenter
Return label
End Function
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Multiline property.
Note
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.
reporting-web-forms-handle-server-side-errors/CS/DXWebApplication1/Reports/XtraReport3.cs#L61
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(33.33333F, 10.00001F);
this.xrLabel1.Multiline = true;
this.xrLabel1.Name = "xrLabel1";
reporting-web-forms-handle-server-side-errors/VB/DXWebApplication1/Reports/XtraReport3.vb#L59
Me.xrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(33.33333F, 10.00001F)
Me.xrLabel1.Multiline = True
Me.xrLabel1.Name = "xrLabel1"
See Also