【问题标题】:Print a chart (toolkit)打印图表(工具包)
【发布时间】:2014-10-02 06:20:53
【问题描述】:

我希望能够打印我使用 silverlight-toolkit 制作的图表。
该应用程序是用 Silverlight 4 编写的。
但是我不知道如何完成这项工作。
有人知道这是如何工作的或在某处有教程吗?
我一直在 Google 上搜索,看看是否能找到一些东西,但没有找到适合我的东西。

提前致谢。

编辑:
单击打印按钮后,我正在使用以下代码,但没有任何反应:

Chart chartToPrint; // The element to be printed
PrintDocument doc = new PrintDocument(); // Create the PrintDocument  object that will do the printing
doc.PrintPage += (s, args) =>
{
  // Set the chart that needs to be printed.
  // As soon as this is set, printing starts
  args.PageVisual = chartToPrint;
}

编辑:
我尝试过的事情:
http://gergelyorosz.com/2010/05/printing-in-silverlight-printing-charts-and-auto-scaling/
http://kb.yworks.com/article507.html
http://www.visiblox.com/blog/2010/05/advanced-printing-in-silverlight-printing-charts-and-auto-scaling
http://msdn.microsoft.com/en-us/library/system.drawing.printing.pagesettings.landscape(v=vs.110).aspx
printing an image in landscape orientation?
http://msdn.microsoft.com/en-us/magazine/hh148152.aspx

【问题讨论】:

  • 有多篇文章涵盖了这一点,快速访问您最喜欢的搜索引擎like this one
  • 再次感谢您的回复!我会看看这个:)。
  • 我似乎无法进行打印。我现在使用这个代码: Chart chartToPrint; // 要打印的元素 PrintDocument doc = new PrintDocument(); // 创建将执行打印的 PrintDocument 对象 doc.PrintPage += (s, args) => { // 设置需要打印的图表。 // 一旦设置好,打印开始 args.PageVisual = chartToPrint;在我点击打印按钮后运行。但什么也没发生。

标签: c# silverlight printing charts silverlight-toolkit


【解决方案1】:

看看这个网站:http://kb.yworks.com/article507.html。希望这对你有帮助!

【讨论】:

  • 感谢您的回复,但这对我不起作用:(。它似乎无法识别 ContextConfigurator。
猜你喜欢
  • 1970-01-01
  • 2011-01-19
  • 1970-01-01
  • 2011-01-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-04-03
  • 2013-03-16
相关资源
最近更新 更多