Printing Without A Dialog Box

Windows Presentation Foundation User's Guide > Howto: Print

It is also possible to print a document without user interaction. This is done by assigning all required options to a PrintDocument object, and then passing it to the TextControl.Print method. This code sample will send page 1 of a document to the default printer:

private void MenuItem_Click_3(object sender, RoutedEventArgs e)
    PageRange prRange = new PageRange(1,1);
    textControl1.Print("My print job", prRange, 1, Collation.Uncollated);
[Visual Basic]
Private Sub MenuItem_Click_3(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Dim prRange As New PageRange(1, 1)
    textControl1.Print("My print job", prRange, 1, Collation.Uncollated)
End Sub