Back to Devexpress

MapControl.ShowRibbonPrintPreview() Method

windowsforms-devexpress-dot-xtramap-dot-mapcontrol-3adabcd4.md

latest2.9 KB
Original Source

MapControl.ShowRibbonPrintPreview() Method

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

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public void ShowRibbonPrintPreview()
vb
Public Sub ShowRibbonPrintPreview

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.

csharp
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;
    }
}
vb
Private Sub ddbPrint_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ddbPrint.Click
    Select Case printType
        Case (MapControl_PrintingExporting.PrintType.Preview)
            mapControl.ShowPrintPreview()
        Case (MapControl_PrintingExporting.PrintType.RibbonPreview)
            mapControl.ShowRibbonPrintPreview()
        Case (MapControl_PrintingExporting.PrintType.Dialog)
            mapControl.ShowPrintDialog()
    End Select
End Sub

See Also

MapControl Class

MapControl Members

DevExpress.XtraMap Namespace