←Select platform

Print Method

Summary

Starts the printing process for the specified document by opening the print dialog box.

Syntax

C#
VB
C++
public virtual void Print(  
   UIElement element, 
   string documentName 
) 
Public Overridable Sub Print( _ 
   ByVal element As UIElement, _ 
   ByVal documentName As String _ 
) 
public: 
virtual void Print(  
   UIElement^ element, 
   String^ documentName 
) 

Parameters

element
The UI element to print.

documentName
The name of the document to print.

Remarks

When used in WPF, this method will create a new instance of System.Windows.Controls.PrintDialog, calls CreateCanvas to obtain a printable canvas from element and finally calls System.Windows.Controls.PrintDialog.PrintVisual(System.Windows.Media.Visual,System.String).

When used in Silverlight 4, this method will create a new instance of PrintDocument, calls CreateCanvas to obtain a printable canvas from element and finally calls PrintDocument.Print and sets the canvas in the PrintPageEventArgs.PageVisual property.

Example

For an example, refer to PrinterHelper.

Requirements

Target Platforms

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
Leadtools.Windows.Controls Assembly
Click or drag to resize