WPF Slider with ToolKit

Sep 10, 2009 at 8:15 AM
Edited Sep 11, 2009 at 4:44 AM

Hi,

I have created pie chart with 5 slice by using WPF Toolkit. I want to bind the values of pie slice with 5 Sliders each.

Please help me on the following scenarios,

1) When the pie chart is loaded each slice value to be bind with Slider. (Say if Slice1 has value X, the corresponding Slider should show the value X)

2) When modifying the any of the Slider the correspoding PieSlice needs to be updated.

Note: The total value of piechart (sum of pieslices) is 100.

Please help me with sample if any.

Thanks in Advance.

 

Coordinator
Sep 14, 2009 at 10:55 PM

This should be pretty easy if your underlying data objects implement INotifyPropertyChanged for the value you're using as the DependentValue of the PieSeries. Just set up the PieSeries normaly and be sure to use a two-way Binding for the Scrollbars, and the right thing should just happen since the Scrollbar will change the data value which will broadcast via INPC which will update the Chart! :)