Q:

Silverlight toolkit : How to read seleted value of a data point on Bubble Chart

I have created a Bubble chart using silverlight tookit as follows :
<charting:Chart Title="Bubble Chart" 
            LegendTitle="Legend" 
            Name="chart1" Margin="0,0,0,42"   
            HorizontalAlignment="Left" Width="568">
<charting:Chart.Series>
        <charting:BubbleSeries  Title="Pollutant A"  IsSelectionEnabled="True"
                                    ItemsSource="{Binding Pollution}"
                                    IndependentValuePath="AQI" 
                                    DependentValuePath="Level"
                                    SelectionChanged="ChangeSomething"
                                    SizeValuePath="size1" >

            </charting:BubbleSeries>

    </charting:Chart>

And my xaml.cs defines the handler like this :
private void ChangeSomething(object sender, SelectionChangedEventArgs e){

       Text1.text="selection changed"
      // Here I want to show the value of the bubble selected  

}
Can someone Please tell me How to do that ? thanks :)  

A:

The SelectionChangedEventArgs parameter will contain a property called AddedItems, this is a list of the items for the ItemsSource that have been added to the selected items during this change.  Most of the time there is only one, its the item that was just selected.
For the sake of example I'll event a type name for the objects returned by your Pollution property in your model.  I'll give the type name PollutionSample (of course I'm just guessing here).
So you would access the selected PollutionSample like this:-
 private void ChangeSomething(object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count > 0)
     {
         PollutionSample ps = e.AddedItems[0] as PollutionSample;
         if (ps != null)
         {
              // Do something with sample
         }
     }
 }

