打印WPF图片框中显示的图像 [英] Printing image displayed in WPF picture box

查看:296
本文介绍了打印WPF图片框中显示的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试打印ImageBox中显示的图像。我找到了



我缺少什么?



提前致谢。

解决方案

你可以使用 PrintDialog.PrintVisual 方法打印出<$ c WPF中的$ c>图像:

  PrintDialog pd = new PrintDialog(); 
myPrintDialog.PrintVisual(imagebox,Image);


I am trying to print the image that displayed in ImageBox. I found this solution but when I tried it I got the following error:

What am I missing?

Thanks in advance.

解决方案

You could use the PrintDialog.PrintVisual method to print out an Image in WPF:

PrintDialog pd = new PrintDialog();
myPrintDialog.PrintVisual(imagebox, "Image");

这篇关于打印WPF图片框中显示的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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