Print all views in Prism

Topics: Prism v4 - Silverlight 4
Sep 22, 2010 at 4:26 PM
Edited Sep 22, 2010 at 4:38 PM


I'm looking for a way can print all views in all modules loaded by prism.

I searched many way but I can not do that. So anybody suggest me nay solution.

I can get all views loaded but I don't know how call print function. The code below just print one view.

 foreach (var view in viewCollection)      {     

printDocument.PrintPage += (s, pe) =>  {                  

  pe.PageVisual = (UIElement)view;                    

pe.HasMorePages = false;              


Thank you.


Sep 22, 2010 at 6:46 PM


There is not guidance for this topic in Prism out-of-the-box. But if your application do not rely the printing capabilities on the print options of the browser, you could take a look at the following documentation section on MSDN:

I think that it might be achieved from the Shell windows. Therefore, you could pass the UserControl (shell) as UIElement, since it has the main region that contains all views.

Is there any reason because you are trying to print each view separately?

I hope this helps,

Fernando Antivero