如何绑定 LineSeries? IsAsync=“True”的 ItemSource 到 PointCollection?
正如主题所述,我想将 LineSeries 中的数据绑定到我通过计时器在代码隐藏中创建、填充和维护的 PointCollection。 我通过简单的方法取得了一些成功:
<charting:LineSeries.ItemsSource>
<PointCollection x:Name="pntCLeftHand"/>
</charting:LineSeries.ItemsSource>
然后将项目添加到代码隐藏中的“pntCLeftHand”中。
这很有效,但我认为 UI 更新太耗时,所以我希望绑定是异步的。 IsAsync 属性会对我有所帮助,但我想这只能与以下内容一起使用:
<charting:LineSeries ItemsSource="{Binding pntCLeftHand, IsAsync=True}"/>
不幸的是,这不起作用。
有人能给我指路吗?
提前致谢。
As the topic states, I want to Bind the data in a LineSeries to a PointCollection that I create, fill and mantain in Code-Behind through a Timer.
I have some success with the simple approach:
<charting:LineSeries.ItemsSource>
<PointCollection x:Name="pntCLeftHand"/>
</charting:LineSeries.ItemsSource>
And then Adding items into 'pntCLeftHand' in Code-Behind.
This works well, but I think the UI Updating is just too time consuming, so I want the Binding to be Asynchronous. The IsAsync property would help me, but I guess this can only be used with something like the following:
<charting:LineSeries ItemsSource="{Binding pntCLeftHand, IsAsync=True}"/>
Unfortunately that just doesn't work.
Can somebody show me the way?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论