Printing Preview

Hi,

I need some help on printing preview: I changed the printGrid in The EntityRelationship sample to have go:Part.InDiagramBounds=“True” (=False in the sample)
But when i check and uncheck the “show-in place print preview” many times, the number of pages in grid pattern increase, and i discover that diagram.Panel.DiagramBounds are changed ( UpdatePrintGrid
method), why this happen? and how to correct that?
Sincerely
Oualid

The print grid that is shown to represent how the diagram would be printed should not be used in the calculation of how much to print. Since the area to be printed is always larger than the real diagram bounds, including the print grid makes it think that it needs to be a lot larger than it otherwise would need to be.

Basically by setting that attached property to true you are trying to say that the print page should include its own representation in what it prints, which it cannot do.

I suppose if you wanted to print the representation of that huge sheet of paper behind the real diagram contents, you could, but you would need to change the code there not to keep recalculating the print grid’s size based on including itself in its calculations.