How to implement print preview functionality?


I have used Diagram.PrintManager.Print() method for printing.

But if user want to preview before start printing, then how can it be implemented?

In WPF, you can use the standard print preview functionality.
Silverlight does not offer such functionality.

But GoXam does offer something that many people think is superior to print preview.
Take a look at the Entity Relationship diagram sample (“ER Diagram”) and turn on the “In-place print preview” check box.
There is a bunch of code in that sample that demonstrates this way of implementing print preview.


Thanks for your hint.

It worked for me.


There is one minor issue. When I use Control-Shift-mouse-wheel to change the print scale of xDiagram (right side), then there is an issue. A page separator with space is created. Why?
How can I disable it?

Please have a look of the screen-shot:

I don’t understand what the problem is – what is the page separator in that screen shot?

If you don’t want users to change the print scale, you could disable the Control-Shift-wheel behavior.


Please have a look:

Before reducing scale:

After reducing scale:

That’s not the page separator – that’s the edge of the multi-page sheet and its shadow. If you zoom out (Control but not Shift wheel), this should be clear. It is even more clear if you specify the Diagram.Background brush, as shown in the Entity Relationship sample.