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
#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