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

MapControl.ShowPrintPreview() Method

Invokes the Print Preview Form, which shows the print preview of the map control.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

public void ShowPrintPreview()

#Remarks

The Print Preview form displays the map as it will appear when printed. To print the map, use the MapControl.Print method and to export it, use the appropriate ExportTo~ method (e.g., MapControl.ExportToPdf, etc.)

Note

The map control can be previewed, printed or exported only if the XtraPrinting Library is available.

#Example

To print a map, use one of the following methods.

private void ddbPrint_Click(object sender, EventArgs e) {
    switch (printType) {
        case (PrintType.Preview):
            mapControl.ShowPrintPreview();
            break;
        case (PrintType.RibbonPreview):
            mapControl.ShowRibbonPrintPreview();
            break;
        case (PrintType.Dialog):
            mapControl.ShowPrintDialog();
            break;
    }
}
See Also