Skip to main content

How to: Print a Chart and Show its Print Preview

  • 2 minutes to read

This example demonstrates how to print a ChartControl, or show its Print Preview.

To do this, you should use either the ChartControlBase.Print or ChartControlBase.ShowPrintPreview methods.

The Print Preview displays the chart as it will appear when printed. Note that the chart can be previewed and printed only if the DXPrinting Library is available.

The image below shows the print preview of a Chart control.


View Example

Imports Microsoft.VisualBasic
Imports System.Windows

Namespace PrintChart

    Partial Public Class Window1
        Inherits Window
        Public Sub New()
        End Sub

        Private Sub button_ShowPrintPreview(ByVal sender As Object, ByVal e As RoutedEventArgs)
        End Sub

        Private Sub button_Print_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
        End Sub
    End Class
End Namespace