[UWP]如何在数据网格控件中打印数据 [英] [UWP]how can I print data in a datagrid control

查看:128
本文介绍了[UWP]如何在数据网格控件中打印数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用Windows Community Toolkit DataGrid控件来显示和编辑数据。但是,我不知道如何将该数据打印到Pdf或打印机。你能提供样品吗?

解决方案


为了打印数据网格,你可以使用  PrintManager类  PrintDocument
Class
 来做到这一点。将您需要打印的元素添加到  printDocument对象,然后您可以打印它。有关详细信息,请查看此文档: Print
来自你的应用程序


还有一个官方样本你可以参考: Printing >> 


祝你好运,


Roy


I am considering using Windows Community Toolkit DataGrid control to display and edit data. However, I am not sure how I can then print that data to either Pdf or the printer. Can you please provide a sample?

解决方案

Hi,

For printing the datagrid, you could using PrintManager Class and PrintDocument Class to do that. Add the element that you need to print to the printDocument object then you could print it. For more information, please take a look at this document:Print from your app

There is also an official sample that you could refer:Printing 

Best regards,

Roy


这篇关于[UWP]如何在数据网格控件中打印数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆