This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Listen to the SelectedItemsChanged event on the PieSeries. In the event handler, get the PieSeries that raised the event and look in the SelectedItems collection property to see which object is selected. What I want to know is how to code in detail? |
|
|
Hello You can listen to the event in xaml in the usual way like this:
Then in the event handler, cast the sender into a PieSeries. Check that it has at least 1 selected value, then get that value from the SelectedItems collection of the PieSeries and cast it into the appropriate data type. In this example, the data type I've used is StringDouble.
Once you have the StringDouble (or whatever data objects you are using), look at the data and do something based on the values. In you're example, if you were using StringDouble, you could check if the String value is "Monkey", if so, display the list of monkeys in the ListView. If the String value is "Zebra" then do whatever. Alternatively, rather than using StringDouble, you could create a custom data type that includes the list of monkeys etc inside it. This is all up to how you want to model your application. If you do use a custom data type, make sure to set the DataBinding property of the PieSeries to tell it which property to get the numeric values from. Let me know if you have further questions. Jason Fauchelle |
|