1

I would like to display all the informations from my tabs in one place so I could use PrintDocument class to print the content. Is there a way I could gather them in one place to use PrintDocument easily?

Thanks in advance

Bobrovsky
  • 13,789
  • 19
  • 80
  • 130
user1123432
  • 368
  • 3
  • 8
  • have you tried creating a stackpanel and add each tab item as child item in stackpanel.. and then print the stackpanel using printdocument. – Shoaib Shaikh Dec 30 '11 at 19:38
  • That is a great solution, thank you! But there is a new problem: when I click the tabitem whose contents I added to my stackpanel, it doesn't work anymore. – user1123432 Dec 30 '11 at 21:28

1 Answers1

0

You could make a deepcopy of the things you want to print: How do I make a Deep Copy of a UIElement?

and add those to a PrintDocument. Also: if you use DataBinding make sure you set the DataContext of the deepcopy correctly.

Community
  • 1
  • 1
Emond
  • 50,210
  • 11
  • 84
  • 115