如何关闭 WPF Toolkit 图表中的动画
有没有办法直接关闭Xaml中的动画?动画真的很慢,因为我的图表有很多点。
Is there a way to turn off the animations in Xaml directly? The animations are really sluggish as my chart has many points.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经在 http://wpf.codeplex.com/SourceControl/list/changesets 下载了最新的源代码
我的想法是,通过更改不同图表系列(图表点、DataPointStyle)的样式来删除动画
charting:PieDataPoint
尝试删除显示数据的动画并采取使用给定键 (x:key="myStyle" ->
DataPointStyle="{StaticResource myStyle}"
)并删除
Opacity="0"
< code>从您的样式中删除此视觉状态组
编辑
这是更改后的样式。
在我第一次尝试删除动画后,我想放弃,因为它没有效果。
但后来我用源代码的反射器查看了我,发现了一种它仍然有效的方法。
不幸的是,设置 DataPointStyle 还不够,我认为这是一个错误。
在包含图表的控件的构造函数中,只需执行以下命令。
希望这有帮助
i have downloaded the latest source code at http://wpf.codeplex.com/SourceControl/list/changesets
my idea is, to remove the animation by changing the style for the different chart series (chart points, DataPointStyle)
example for
charting:PieDataPoint
try to remove the animation for the shown data and take your own style with a given key (x:key="myStyle" ->
DataPointStyle="{StaticResource myStyle}"
)and remove
Opacity="0"
at<Grid x:Name="Root" Opacity="0">
remove this visual state group from your style
EDIT
This is the changed style.
After my first attempt to remove the animation, I wanted to give up, because it has not worked.
But then I looked upon me with the reflector to the source code and have found a way that it still works.
Setting the DataPointStyle unfortunately is not enough, I think it's a bug.
In the constructor of the control where the chart is included simply execute the following.
hope this helps