oxyplot 入门

  1. 界面
    <Grid>
    <oxy:Plot Title="{Binding Title}">
    <oxy:Plot.Series>
    <oxy:LineSeries ItemsSource="{Binding Points}"/>
    </oxy:Plot.Series>
    </oxy:Plot>
    </Grid>
  2. viewmodel

public class MainViewModel
{
public MainViewModel()
{
this.Title = "Example 2";
this.Points = new List<DataPoint>
{
new DataPoint(0, 4),
new DataPoint(10, 13),
new DataPoint(20, 15),
new DataPoint(30, 16),
new DataPoint(40, 12),
new DataPoint(50, 12)
};
}
public string Title { get; private set; }
public IList<DataPoint> Points { get; private set; }
}

  1. logic
    this.DataContext = new MainViewModel();
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,499评论 0 10
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 10,132评论 0 23
  • 大概我们需要一个有经验的人带我们走过一段旅程。 在路上我们依赖并渴望被保护。 但记得冷静自持。 才能在未来可能的别...
    祈江阅读 131评论 2 1
  • 谁曾关注 一棵树的灵魂 一圈圈的年轮 时光流经的痕迹 泥土是它的伴侣 亲吻别离 怀念曾经的自己 那离去的 就让它随...
    舒宜阅读 715评论 12 3
  • 短短四个字,要经历好多总结很多看透许多才能去认真贯彻落实吧。 晚上跟coco又见面,这次没有见网友的感觉了。看到他...
    你好ya阅读 360评论 0 0