Skip to main content

PrintPreviewRibbonFormEx() Constructor

Initializes a new instance of the PrintPreviewRibbonFormEx class with the default settings.

Namespace: DevExpress.XtraPrinting.Preview

Assembly: DevExpress.XtraPrinting.v23.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.Printing


public PrintPreviewRibbonFormEx()


To preview a document in the Print Preview with a Ribbon, use the following code:

using System.Drawing;
using DevExpress.XtraPrinting;
using DevExpress.XtraPrinting.Preview;
// ...

private void button1_Click(object sender, EventArgs e) {
    // Create a new Preview form and its Printing System.
    PrintPreviewRibbonFormEx previewForm = new PrintPreviewRibbonFormEx();
    PrintingSystem printingSystem1 = new PrintingSystem();

    // Assign a Printing System to a Preview form.
    previewForm.PrintingSystem = printingSystem1;

    // Create a simple document.
    printingSystem1.Graph.Modifier = BrickModifier.Detail;
    printingSystem1.Graph.DrawString("Ribbon Preview Form", Color.Black, 
        new RectangleF(0, 20, 200, 20), BorderSide.None);

    // Show the Print Preview form with a Ribbon.
See Also