如何在wpf控件中显示打印对话框

时间:2014-07-09 13:55:35

标签: c# wpf winforms print-preview

我有从PrintDialog类派生的Printer类,我使用这个类来打印文档。如何在Windows窗体的“打印预览控件”中显示此文档?它适用于Windows窗体,但不适用于WPF。

我在XAML中有控制力:

<WindowsFormsHost Margin="242,6,144,20">
    <wf:PrintPreviewControl x:Name="ppcShow" />
</WindowsFormsHost>

和代码:

Printer p = new Printer();
ppcShow.Document = p;

如何显示文件数据?

0 个答案:

没有答案