在什么情况下我想处理 ChartArea.AxisViewChanging 而不是 ChartArea.AxisViewChanged?
继续我的代码咒语,使用 System.Windows.Forms 命名空间中的 DataVisualization.Charting。
仍在努力弄清楚如何连接两个水平轴:一个与 Point ChartArea,另一个与 RangeBar ChartArea。
当我在这些图表的轴上滚动时,我可以处理 ChartArea.AxisViewChanging 或 ChartArea.AxisViewChanged。这两个事件都提供一个 ViewEventArgs 对象作为输入,其中包含 NewPosition、NewSize、NewSizeType 等字段,我认为这些字段是轴视图范围、位置等的更新值。
我什么时候想要处理 AxisViewChanging 与 AxisViewChanged?调用 AxisViewChanged 时事情是否“更加确定”?对于我想做的事情(这里,此处,以及此处)当对象“采用”ViewEventArgs 中提供的新值时,可能会产生很大的差异。
谢谢!
Continuing my code incantations with DataVisualization.Charting in the System.Windows.Forms namespace.
Still working to figure out how to tie two horizontal axes: one with a Point ChartArea and another with a RangeBar ChartArea.
As I scroll around on the axes of these graphs, I can handle ChartArea.AxisViewChanging or ChartArea.AxisViewChanged. Both events provide a ViewEventArgs object as input, which contains fields like NewPosition, NewSize, NewSizeType, which I'd think would be the updated values for the axis view range, position, etc.
When would I want to handle AxisViewChanging vs. AxisViewChanged? Are things "more finalized" when AxisViewChanged is called? For what I'm trying to do (here, here, and here) it may make a big difference when the object "takes" the new values provided in the ViewEventArgs.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自在线书籍(下面包含链接):
轴视图改变
当轴比例视图位置或大小即将更改时发生。
AxisViewChanged
当轴比例视图位置或大小更改时调用。
在任何事情真正发生改变之前,第一次火灾就会发生。
From books online (links included below):
AxisViewChanging
Occurs when the axis scale view position or size is about to change.
AxisViewChanged
Called when the axis scale view position or size is changed.
The first fires before anything has actually changed.