LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly)
LEAD Technologies, Inc

Print Method






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. .NET support
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
)
 function Leadtools.Windows.Printing.PrinterHelper.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: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PrinterHelper Class
PrinterHelper Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.