views:

1929

answers:

1

I'm really loving the WPF RichTextBox, and all of the out-of-the-box functionality it comes with... but printing is something that I'm having trouble with. I can print (from code) using a PrintDialog and passing in my RichTextBox as a Visual (or by using the "Document")...

But my question is, is there a simple way to use the application commands:

  • ApplicationCommands.Print
  • ApplicationCommands.PrintPreview

With a WPF RichTextBox? Also, how would I go about letting the user change the page layout and such?

Thanks,

A: 

Take a look at http://blogs.msdn.com/llobo/archive/2007/01/24/printing-richtextbox-content-find-the-idle-printer.aspx

Ifeanyi Echeruo
I did mention that I can print in Code... but that I'm looking for a pure Xaml solution if possible.
Timothy Khouri