WPF Bind to the list of installed printers [duplicate] WPF Bind to the list of installed printers [duplicate] wpf wpf

WPF Bind to the list of installed printers [duplicate]


Add the namespace for System.Drawing.Print to your XAML code:

xmlns:Printing="clr-namespace:System.Drawing.Printing;assembly=System.Drawing"

Then add the combobox to show the list of printers installed on the system:

<ComboBox Name="cmbPrinterSelection" Width="300" ItemsSource="{x:Static Printing:PrinterSettings.InstalledPrinters}" SelectionChanged="cmbPrinterSelection_SelectionChanged" />

Hopefully this will save someone some time.