Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PrintPreviewRibbonFormEx() Constructor

In This Article

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

Namespace: DevExpress.XtraPrinting.Preview

Assembly: DevExpress.XtraPrinting.v24.2.dll

NuGet Package: DevExpress.Win.Printing

#Declaration

public PrintPreviewRibbonFormEx()

#Example

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.Begin();
    printingSystem1.Graph.Modifier = BrickModifier.Detail;
    printingSystem1.Graph.DrawString("Ribbon Preview Form", Color.Black, 
        new RectangleF(0, 20, 200, 20), BorderSide.None);
    printingSystem1.End();

    // Show the Print Preview form with a Ribbon.
    previewForm.Show();
}
See Also