GanttView for WPF
印刷

GanttView lets you print the chart and use basic as well as advanced print settings through built-in methods.

You can use Print method of the PrintManager class to facilitate printing. The Print method has various parameters that let you specify print type, report options, and file name. To set report options, you can use the ReportOptions class which provides various properties to set header, footer, header style, legend, page margins, and so on. Additionally, the PrintType parameter provides various printing layout styles as described in the following table:

Options Description
Customer Layout customized by user.
General Layout contains only gantt chart.
LegendEveryPage Layout contains gantt chart and legend on every page.
LegendLastPage Layout contains gantt chart and legend on last page.

Use the following code to print a GanttView report. The following code prints the report using the Print method after setting the margins and header.

C#
コードのコピー
PrintManager print = new PrintManager();
ReportOptions ro = new ReportOptions();
ro.Margin = 10;
ro.HeaderCenter = "Project Schedule";
print.Print(gv, ro);