Silverlight Simple MVVM Printing - by Deborah Kurata
Many users want to print information from your line of business (LOB) application. This post covers the simple case where the user wants to print a copy of what they see on the screen. But instead of putting the print code in the code behind file, it follows a Model-View-View/Model (MVVM) approach.
NOTE: This post is part of a series that starts with this prior post. The example in this post uses the application that is built as part of that series.
NOTE: If you are new to MVVM, this prior post provides an introduction.
Silverlight 4 introduced two features that are the basis of this post: printing support and commanding.
Using the built-in commanding feature to support printing requires the following steps:
1) Create a command class that implements the ICommand interface.
2) Create a property of type ICommand in the View/Model class for a PrintCommand.
3) Build a button to launch the printing and bind the Command property of the button to the property created in 2 above.
Read More from: Original Source
Post Contributed by: Kunal Chowdhury
Kunal is the Site Admin and Contributor of Silverlight-Zone. He is a Software Engineer, Microsoft Silverlight MVP, Code Project Mentor and a Code Project MVP. He is also an active Author in SilverlightShow.net and a speaker in various community events. He works on Microsoft Platform and very passionate about Silverlight technology. He started his career in 2007 and achieved various awards during his professional life.
He shares his findings in his personal blog: http://www.kunal-chowdhury.com and he also tweets at: @kunal2383.