To get the color of the pie slice you can use the GetEntry
() method of the Palette class. Then you can apply it via the DefaultVisualStyle
property of the BarSeries. You can create the Style in code and apply it to the series. Or alternatively, you can use bindings instead of the SelectionChanged event. This way you can bind the ItemsSource of the BarSeries directly to the SelectedItems of the RadPieChart. Also, you can use the SelectedItems in the DefaultVisualStyle and convert them to a color using IValueConverter. I prepared a small example showing this approach. Can you please give it a try and let me know how it goes?
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin
, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.