The managed wrapper PrintDialog is also present in the Microsoft.Win32 namespace, and provides you with the interface to call the operating system's printer properties and perform the print operation. The dialog gives you the option to Select Printer, configure the printing preferences, and select the page range and other parameters, as shown in the following screenshot:
To invoke the same, just create the instance of the PrintDialog and call its ShowDialog() method. You can optionally set page range, printable area, and other properties. If the dialogResult returned by the ShowDialog() method is set to true, it confirms that the printing job has been queued up successfully, and based on that you can perform the next set of actions.
Here's the code snippet for your reference:
private void OnPrintButtonClicked(object sender, RoutedEventArgs e) { var printDialog = new PrintDialog(); var dialogResult = printDialog.ShowDialog(); if (dialogResult == true) { // perform the print operation } }