LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly)

Print Method

Show in webframe





The UI element to print.
The name of the document to print.
Starts the printing process for the specified document by opening the print dialog box.
Syntax
public virtual void Print( 
   UIElement element,
   string documentName
)
'Declaration
 
Public Overridable Sub Print( _
   ByVal element As UIElement, _
   ByVal documentName As String _
) 
'Usage
 
Dim instance As PrinterHelper
Dim element As UIElement
Dim documentName As String
 
instance.Print(element, documentName)

            

            
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

See Also

Reference

PrinterHelper Class
PrinterHelper Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.