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 )
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.