We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Diagram header and footer

Hi,

I want to add Header and footer to the diagram when the diagram is Print preview and Print.

The header and footer should appear in all pages with multiple lines of Rich Text formatting.

Do you have any sample code for reference?

Thanks in advance.


Lan

4 Replies

J. J.Nagarajan Syncfusion Team February 8, 2007 04:50 PM UTC

Hi Lan,

Yes, you can add header and footer to the diagram by using Header Footer dialog. We have this functionality in our Printing Sample. It is located in (C:\Program Files\Syncfusion\Essential Studio\\Windows\Diagram.Windows\Samples\Quick Start\Printing). This sample shows the use of the prebuilt Header Footer, Page Setup and Page Border dialogs for configuring the respective attributes.

Please kindly refer to it and let me know if you have any questions.

Thanks for using Syncfusion product.

Regards,
Nagaraj


AD Administrator Syncfusion Team February 8, 2007 09:40 PM UTC

Hi,
Thanks for help. This sample is helpful.

I try to adjust the header/footer width according to the page setting (Landscape or portriat, and the Left/right margins). I mean whenever you change page settings, the header/footer width should automattically be set to page size. I cannot find this Auto-Size feature. So I want to use code to do that.

Please see my attached sample Printing_2003.sln. in SetHeaderFooterPageBorder(), I use this line to set header/footer width, but it does not work.


//????? This line does not work to adjust the header with fitting the page width
diagram.Model.HeaderFooterData.Header.Bounds.Width=(diagram.View.PageSettings.Landscape)?
diagram.View.PageSettings.Bounds.Height:diagram.View.PageSettings.Bounds.Width;


You can use 'Page Setup' menu to change 'Portriat' to 'Landscape' and the Left/right margins, then Print Preview to see the Header/Footer.



Lan








Printing1.zip


AD Administrator Syncfusion Team February 9, 2007 04:01 PM UTC

Hi,
I just noticed another issue in my previous email's sample .

when PrintPreview idsplays, the page border line is not completely drawn. when you resize the window or Maximum the window, then the page border line diaplays completely.
It looks like need some code to refresh the PrintView window.

Any idea?

Lan


J. J.Nagarajan Syncfusion Team February 13, 2007 01:54 AM UTC

Hi Lan,

Could you please follow up the incident : 31730.

Thanks,
Nagaraj

Loader.
Live Chat Icon For mobile
Up arrow icon