c# - PlotView 和 Plot 之间有什么不同?

标签 c# wpf mvvm oxyplot

我见过两种图表用法,PlotViewPlot

如果我使用 PlotView,我只能使用 Model="{Binding MyModel}",我不能像源一样设置其他绑定(bind)。我无法实现 MVVM。

但是如果我使用Plot,我可以进行任何绑定(bind),xaml 中的许多子控件设置喜欢seriesaxes 和等等。

我可以知道有什么不同吗?

最佳答案

两种方法都对,而且都遵循MVVM模式。我认为两者之间的唯一区别是,正如创作者 (Oystein Bjorke) 所说:

The PlotView component is now similar on all platforms, it contains only Model and Controller properties. The Plot control let you define axes, series, annotations etc. and this should only be available in XAML-based platforms.

链接:http://discussion.oxyplot.org/topics/240-cant-define-axes-in-xaml/

作为个人意见,起初我使用了Plot组件,但后来我遇到了一个问题:如果你想导入绘图,你必须先创建 View 。然后我切换到 PlotView 组件,导入工作正常,没有创建 View 。

关于c# - PlotView 和 Plot 之间有什么不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41604154/

相关文章:

c# - 在 Cisco 电话上获取实时调用信息

c# - HttpPostAttribute 中 Name 参数的用途是什么

WPF:MSVS 2010 和混合。 Studio 设计师会很快取代 Blend 吗?

wpf - wpfgfx_v0400.dll 上的 APPCRASH 仅在 32 位系统上

c# - 如何从列表中删除?面向 MVVM 模式

c# - 使用 C# 访问 GIF 帧

c# - .NetCoreApp 和 .NetStandard.Library 有什么区别?

wpf - 如何防止 WPF 裁剪我的图像?

wpf - 键绑定(bind)问题

c# - 如何使用 MVVM 从 ViewModel 显示 View 并在 WPF 中设置该 View 的数据上下文