在WPF中打印多页 [英] Printing Multiple pages in wpf

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

问题描述

我有一个Scroll Viewer,里面有一个包含多页内容的文本块.我如何在Scroll Viewer中打印所有内容.我正在使用WPF MVVM模式.文本块是正确的控件吗?还是我应该使用其他WPF控件??

提前谢谢..

I have a Scroll Viewer and inside that a text block with multiple pages contents. How can I print everything within the Scroll Viewer.I''m Using WPF MVVM pattern. Is text block is the right control for this?Or shall I go for any other WPF controls.?

Thanks in advance..

推荐答案

我不知道到底是什么问题,但是与打印机有关.

从控制面板->打印机和传真

1.右键单击打印机,然后选择打印机首选项
2.将Source属性更改为``Manual Feed''&Apply.(最初是``AutoSelect'')
3.仍然有一些错误.
4.再次将Source属性更改回``Auto Select''&Apply.
5,将快速设置属性更改为``默认值''并应用
5.现在,它的工作正常了.
I don''t know what is exactly the problem,But something related to Printer.

From Control Panel->Printers & Fax

1.Right Click the Printer and take Printer preferences
2.Change the Source property to ''Manual Feed''& Apply.(Initially it was''AutoSelect'')
3.Still got some error.
4.Again me changed the Source property back to ''Auto Select''& Apply.
5.Changed the Quick set Property to ''Defaults''& Apply
5.Now its Working Fine


这两个子句矛盾:如何在Scroll Viewer中打印所有内容?"和我正在使用WPF MVVM模式".如果确实使用过MVVM,则不会打印滚动查看器的内容,而不会打印窗口;否则,不会打印窗口.您将打印模型的数据. MVVM模型有两种形式:面向对象的方法或以数据为中心的方法.在这两种情况下,您都有数据;描述通过数据访问层访问的数据内容的真实状态内容.请参阅 http://en.wikipedia.org/wiki/MVVM [ http://msdn.microsoft.com/en-us/library/ms742418.aspx [ ^ ].它可以尽可能地类似于您的窗口,但肯定不会包括屏幕上的窗口和滚动控件通常具有的垂直大小的限制:-).

—SA
These two clauses contradict: "How can I print everything within the Scroll Viewer?" and "I''m using WPF MVVM pattern". If you really used MVVM, you would print not the content of the scroll viewer and not the window; you would print the data of the Model. MVVM Model comes in two flavors: object-oriented approach or data-centric approach. In both cases you have data; either describing the real state content of the data content accessed via the data access layer. See http://en.wikipedia.org/wiki/MVVM[^].

You can use data to compose XPS document out of it which can be printed. Please see http://msdn.microsoft.com/en-us/library/ms742418.aspx[^]. It can resemble your window as much as you can but certainly will not include limitations of the vertical size typical for the on-screen window and scroll controls :-).

—SA


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

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