The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRLabel.Multiline Property

Gets or sets whether carriage return (CRLF) characters split the label's text into multiple lines.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

Declaration

[SRCategory(ReportStringId.CatBehavior)]
[DefaultValue(false)]
public bool Multiline { get; set; }
<SRCategory(ReportStringId.CatBehavior)>
<DefaultValue(False)>
Public Property Multiline As Boolean

Property Value

Type Default Description
Boolean

false

true, if carriage return (CRLF) characters split the label's text into multiple lines ; otherwise, false.

Remarks

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:

  • NewLine.
  • ControlChars.CrLf.
  • vbCrLf (Visual Basic only).

Example

The code sample below illustrates how to display multiline text in an XRLabel control.

xrlabel-multiline

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;
}
See Also