This is a migrated thread and some comments may be shown as answers.

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

1 Answer 33 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Douglas
Top achievements
Rank 1
Douglas asked on 19 Mar 2012, 06:48 PM
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}">

1 Answer, 1 is accepted

Sort by
0
Douglas
Top achievements
Rank 1
answered on 20 Mar 2012, 01:02 AM
 BindingOperations.SetBinding(mapping, SeriesMapping.ItemsSourceProperty, new Binding("Datasource2"));

Where mapping is a new SeriesMapping()


Tags
Chart
Asked by
Douglas
Top achievements
Rank 1
Answers by
Douglas
Top achievements
Rank 1
Share this question
or