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

XRRichText.BeginInit() Method

Starts the XRRichText's initialization. Initialization occurs at runtime.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

public void BeginInit()
Public Sub BeginInit

Remarks

The Visual Studio .NET design-time environment calls this method to start initializing a component used on a form, or by another component. The XRRichText.EndInit method ends the initialization. Use the BeginInit and EndInit methods to prevent the control from being used until it has been completely initialized.

Examples

The following method demonstrates how to create an XRRichText object, set some of its properties, and then save its contents to a text file.

using System;
using DevExpress.XtraReports.UI;
// ...

public XRRichText CreateXRRichText(){
    // Create an XRRichText object.
    XRRichText xrRichText1 = new XRRichText();

    // Set its height to be calculated automatically,
    // and make its borders visible.
    xrRichText1.CanGrow = true;
    xrRichText1.CanShrink = true;         
    xrRichText1.Borders = DevExpress.XtraPrinting.BorderSide.All;

    // Create an array of lines and assign it to the rich text.
    string[] boxLines = new String[3];
    boxLines[0] = "Line 1";
    boxLines[1] = "Line 2";
    boxLines[2] = "Line 3";
    xrRichText1.Lines = boxLines;

    // Export its contents to a text file.
    xrRichText1.SaveFile("output.txt", XRRichTextStreamType.PlainText);

    return xrRichText1;
}
See Also