I have a list of objects (custom) with two properties each (date, value) and I'd like to bind this list to a LineSeries object.
This is what I have so far...
var series = new LineSeries();
series.ItemsSource = this._storObj; // This is the List<object>
storage开发者_如何学编程Chart.Series.Add(series);
How do I tell the series what properties to use on the objects in the code-behind. I've seen many XAML examples but need to do this in the code behind.
Thanks!
Jeffrey Kevin Pry
Something like this maybe ?
series.DependentValueBinding = new Binding("NameOfYourValueProperty");
series.IndependentValueBinding = new Binding("Date");
Hope that helps ;)
精彩评论