- 1
- 0
- 约2.42千字
- 约 2页
- 2024-02-06 发布于广西
- 举报
WPF深入研究之Print打印
本章共计51个示例,全都在VS2008下.NET3.5测试通过,点击这里下1.PrintDialog
ThissampleillustrateshowtocreateaninstanceofasimplePrintDialogandthendisplayit.ThesampleusesbothExtensibleApplicationMarkupLanguage(XAML)andproceduralcode.
这个示例演示了如何进行一个最简单的打印工作,为此需要引入两个dll:
ReachFramework.dll和System.Printing。
InvokePrint方法只是显示了一个PrintDialog打印框,并未进行打印工作:
PrintDialogpDialog=newPrintDialog();pDialog.PageRangeSelection=PageRangeSelection.AllPages;pDialog.UserPageRangeEnabled=true;pDialog.ShowDialog();
有PrintableAreaHeight和PrintableAreaWidth两个属性,分别用来表示可打印区域的高和宽。
原创力文档

文档评论(0)