A newer version of this page is available.
Switch to the current version.
MapControl.ShowPrintDialog() Method
Displays the standard Print dialog to print the data displayed in the MapControl.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v19.2.dll
Declaration
Remarks
The Print dialog allows you to select a printer and its settings, and then start or cancel the print operation.
Examples
To print a map, use one of the following methods.
- MapControl.ShowPrintPreview - invokes the Print Preview Form;
- MapControl.ShowRibbonPrintPreview - invokes the Print Preview Form with the Ribbon bar;
- MapControl.ShowPrintDialog - invokes the standard Print Dialog.
NOTE
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-print-or-export-a-map-t185956
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
Feedback