Monday, February 07, 2011

Multiple page printing in Silverlight 4

Exactly a year ago I made a simple Silverlight app for Esri developer summit. The idea was simple - show and filter the sessions in a tree view and highlight the room when you hover on a session.  Although I think you can attend the summit without using this app, I made it for the challenge. When the summit started I knew the schedule by heart...

For this year summit I thought how to improve the app so it will be more useful. I've added these modules:


1. Select your favorites sessions.
2. Import/export to a backup file.
3. Print all sessions/selected session.

So far, I have avoided dealing with printing in Silverlight, but no more. Read some articles and got to work. It took me 3-4 hours to complete it and I am pretty satisfied with the result.
The three steps of Silverlight printing are:

Step1 : Acknowledge that you have to build your page brick by brick.
Step2 : Design the page.
Step3 : Use the PrintDocument class.

Read more: Gal Systems - Oren Gal's GIS Website