Xceed Chart for WinForms v4.4 Documentation
PrinterName Property
Example 


Xceed.Chart.v4.4 Assembly > Xceed.Chart Namespace > PrintManager Class : PrinterName Property
The name of the printer used for printing.
Syntax
'Declaration
 
Public Property PrinterName As String
'Usage
 
Dim instance As PrintManager
Dim value As String
 
instance.PrinterName = value
 
value = instance.PrinterName
public string PrinterName {get; set;}
Remarks
You can enumerate the installed printers by iterating in the PrinterSettings.InstalledPrinters collection of a PrintDocument object or use the EnumerateInstalledPrinters function of the PrintManager object.
Example
The following example prints a page on the default printer (if any).
ArrayList arrPrinters = new ArrayList();
 int defaultPrinter = ChartControl.PrintManager.EnumerateInstalledPrinters(arrPrinters);
 <para>
 if (defaultPrinter != -1)
 {
   ChartControl.PrintManager.PrinterName = arrPrinters[defaultPrinter].ToString();
   ChartControl.PrintManager.Print();
 }
 </para>
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

PrintManager Class
PrintManager Members