带有弹出窗口的Silverlight打印 [英] Silverlight Printing with a Popup

查看:78
本文介绍了带有弹出窗口的Silverlight打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的UI由一组图表组成,并且当您单击图表中的数据点时,将打开一个弹出窗口,其中包含该点的详细信息.打印工作正常,但现在应该包含弹出窗口(如果有).我的互联网研究表明这是不可能的,因为它们实际上并不是视觉树的一部分.有人知道吗?

My UI consists of a set of charts, and when you click on a data point in the chart, a Popup opens with the details for that point. Printing is working, but now I''m supposed to include the Popups if they''re present. My internet research suggests it''s impossible as they''re not really part of the visual tree. Anyone know for sure? If it''s not possible, any good suggestions on the simplest refactor of the popups that will print?

推荐答案

如果使用的是Chart Control的默认弹出式窗口,如果不可能的话,对将要打印的弹出窗口的最简单重构有什么好的建议吗?然后不要使用它.在面板上添加了一个弹出窗口和Chart控件,并使该弹出窗口被打开为False,在DataPoint Mouseover上触发该事件,并将isopen设置为true.然后,您要弹出的控件将出现在VisualTree上,并且还将显示DataPoint值. br/>

问候
Siraz女士
If you are using the default popup of Chart Control , then do not use it. added a popup and Chart control to a Panel ,and make that popup isopen as False,fire the event on DataPoint Mouseover and make the isopen to true.then you are popup control will come on VisualTree and it will Display the DataPoint Value too.


Regards
Md.Siraz


这是问题所在的Silverlight弹出控件.它不像所有标准控件一样属于同一个视觉树的一部分,这就是为什么它显示在对其进行渲染的控件边界之外的原因.即使将PageVisual设置为等于应用程序的RootVisual,也不会捕获显示的任何弹出窗口.解决方案是删除Popup包装器,改为动态更改容器的Visible属性(这还意味着手动维护ZIndex,使(非)弹出窗口位于顶部,并处理(非)弹出窗口时的大小/放置问题.在父控件的边缘呈现.)
It''s the Silverlight Popup control that was the problem. It''s somehow not part of the same visual tree as all the standard controls, which is why it displays outside the borders of controls over which it is rendered. Even setting the PageVisual equal to the RootVisual of the application doesn''t capture any Popups displayed. Solution was to remove the Popup wrapper, changing the Visible property of the container on the fly instead (which also means manually maintaining the ZIndex so the (non)popups are on top, and handling sizing/placement issues when the (non)popup would be rendered at the edge of the parent control).


这篇关于带有弹出窗口的Silverlight打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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