How do I set binding to a chart mapping's itemdatasource programatically?

2 posts, 0 answers
  1. Douglas
    Douglas avatar
    15 posts
    Member since:
    Feb 2012

    Posted 19 Mar 2012 Link to this post

    I found the sample to bind multiple datasources to a single chart, but how can I do this programmatically instead of in the XAML?

    <charting:SeriesMapping LegendLabel="Vehicles in circulation" ItemsSource="{Binding DataSource2}">
  2. Douglas
    Douglas avatar
    15 posts
    Member since:
    Feb 2012

    Posted 19 Mar 2012 Link to this post

     BindingOperations.SetBinding(mapping, SeriesMapping.ItemsSourceProperty, new Binding("Datasource2"));

    Where mapping is a new SeriesMapping()


  3. DevCraft banner
Back to Top