RichTextBoxLink Class

A link to print the RichTextBox control.

Namespace: DevExpress.XtraPrintingLinks

Assembly: DevExpress.XtraPrinting.v20.1.dll

Declaration

Remarks

Use the RichTextBoxLink class to print the RichTextBox control.

To do this, assign an existing RichTextBox object to the RichTextBoxLinkBase.RichTextBox property, and then call either the RichTextBoxLink.ShowPreview (RichTextBoxLink.ShowPreviewDialog) method to preview a document, or the RichTextBoxLink.Print (RichTextBoxLink.PrintDlg) method to send it to a printer.

Examples

This example illustrates how to create and display a Print Preview for the RichTextBox control, via the RichTextBoxLink.

PrintingLinks-RichTextBox

using System;
using System.Windows.Forms;
using DevExpress.XtraPrintingLinks;
// ...

private void simpleButton1_Click(object sender, EventArgs e) {
    RichTextBoxLink rtbLink = new RichTextBoxLink();
    rtbLink.RichTextBox = richTextBox1;
    rtbLink.RtfReportHeader = "Rich Text Box Link";
    printingSystem1.Links.Add(rtbLink);
    rtbLink.ShowPreviewDialog();
}
See Also