Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have frame it contains large number of controls and I want to print whole frame data and controls can you guide me or send snippets
Posted
Updated 28-Jan-14 3:30am
v2
Comments
MCY 28-Jan-14 9:31am    
take a look at here : http://social.msdn.microsoft.com/Forums/en-US/0351e9e3-363d-4f2b-a8d4-7b07e934e964/printing-a-frame-control-contents?forum=wpf

1 solution

This is not as easy as it may seem. This is the short article starting with the phrase "Writing code for printing has a bad reputation." (true!): http://programming-pages.com/2012/06/12/printing-in-wpf[^].

This open-source product can help you: http://wpfprintengine.codeplex.com[^].

There are also some article on CodeProject devoted to it.

The thing is: the printing techniques allow you to format and print out any data. Actually, it's a good idea not to print controls, but print data you bind with those controls. At the same time, I can understand that you need to follow the same exact design you created on your WPF screen, without having to do some work twice. But what you designed for screen is not really designed to be put on print pages, so this is a clear real-life controversy. The product references above provides a facility to print any existing Visual, so this is what can help you.

—SA
 
Share this answer
 
Comments
Pete O'Hanlon 28-Jan-14 11:16am    
Indeed. I couldn't have put it better. My 5.
Sergey Alexandrovich Kryukov 28-Jan-14 11:33am    
Thank you, Pete.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900