Occurs when each page is printing.
Assembly: System.Windows (in System.Windows.dll)
Handle this event to specify the contents of the printed page. You can print the entire Silverlight control by setting the PrintPageEventArgs.PageVisual property to the layout root of the Silverlight content. Alternatively, you can print a portion of the Silverlight control by setting PrintPageEventArgs.PageVisual to the named UIElement that you want to print.
After the event occurs, the specified PrintPageEventArgs.PageVisual will be sent to the printer to be printed. If the content is too large to fit in the PrintableArea, it will be clipped. If the HasMorePages property is true, the event occurs again.
For more information about handling events, see Events Overview for Silverlight.
Partial Public Class MainPage Inherits UserControl Private pd As PrintDocument() Public Sub New() InitializeComponent() pd = New PrintDocument() End Sub Private Sub PrintButton_Click(ByVal sender As Object, _ ByVal e As RoutedEventArgs) pd.Print("M yMap") End Sub Private Sub pd_PrintPage(ByVal sender As Object, _ ByVal e As PrintPageEventArgs) Handles pd.PrintPage e.PageVisual = mapImage End Sub End Class
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.