Leadtools.Windows.Printing Namespace > PrinterHelper Class : Print Method |
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 )
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.
For an example, refer to PrinterHelper.
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