Hi,
I am working with XamDatagRid, and want to print its visual section. Below is my codes:
var reportObj = new Report(); var section = new
EmbeddedVisualReportSection(this.restrictionData); reportObj.Sections.Add(section); reportObj.Print();
but the print dialog always shows up on
the left corner of application,
can I make it on the center of its owner?
how can i achieve this please? please see pic1.png.
And another question is:
how can i add a header which is in the center
and space line above/below.
please see the picture attached (pic2.png is what I wanted).
Hello,Thank you for your feedback.If you require any further assistance on the matter, please let me know.
Really appreciate.
Thanks
Hello, The print dialog instance is a separate system dialog that does not exist within the context of the current WPF application and because of that, you will not be able to get it and manipulate it's positioning. In order to create a header element on top of the XamDataGrid when printing it, you can do that by setting the PageHeaderTemplate property of the Report class.For Example: report.PageHeaderTemplate = this.Resources["headerTemplate"] as DataTemplate; I have prepared a sample application with an implementation of the header template, along with a Print Preview option. If you require any further assistance on this matter, please do not hesitate to ask.
here is pic2.png