Displays the extended MindFusion.Diagramming print-preview window.
Namespace: MindFusion.Diagramming.WinForms
Assembly: MindFusion.Diagramming.WinForms
C# Copy Code |
---|
public void PrintPreviewEx () |
Visual Basic Copy Code |
---|
Public Sub PrintPreviewEx () |
Opens an extended Print Preview window for the current diagram. Compared to the standard .NET preview dialog, the extended one provides better-looking icons and additional buttons such as "page orientation" and "scale to page". PreviewOptions allows assigning custom images to the preview toolbar buttons and localizing the menu item and tooltip texts.
The preview output is rendered with the same settings that are used for printing, assigned by the PrintOptions structure. That ensures uniform output of the printed document both on paper and in the preview mode. Print job settings include document title and several flags that control whether images, shadows, headers, and so on, are printed.
It is possible to create your own preview form and specify it as an argument to the third overload of PrintPreviewEx. Your preview form class must implement the IPrintPreview interface defined in MindFusion.Diagramming.WinForms.dll. IPrintPreview contains a single property called Document of type System.Drawing.Printing.PrintDocument. The method sets this property to the diagram document and calls the ShowDialog method of your form.