I am unable to add text in header / footer when i use custom PrintManager.
If i remove custom class its showing my header / footer text. But unable to have In-place print preview.
How can I add my own text in header/footer, could you please help with a sample.
Are you using the PreviewingPrintManager defined in the EntityRelationship sample? Does that class do what you want in that sample? What changes have you made to that class in your app?
So you are saying that the XAML that you just quoted works, but that if you replace go:PrintManager with local:PreviewingPrintManager, it doesn’t work?
Yes, that is because the initialization of the PreviewingPrintManager replaces the DIagram.PrintManager with itself, so whatever you specified in XAML is being thrown away:
public class PreviewingPrintManager : PrintManager {
// Setup this Diagram.PrintManager to automatically update the "Print Grid".
public void Init(Diagram diagram) {
diagram.PrintManager = this;
. . .
Do this initialization instead:
(myDiagram.PrintManager as PreviewingPrintManager).Init(myDiagram);