I see there are a lot of examples of how to style these charts in XAML. I need an example of how to style a RadPieChart using the code behind method.
My reason is I'm working on a "universal" control that I can feed different sets of data (Name Value Pairs) and would like to control the color of each slicestyle and programmatically match a custom style to each data point. I don't see how this can be done in XAML.
Take this simple example.
<telerik:PieSeries>
<telerik:PieSeries.SliceStyles>
<Style TargetType="Path"> <Setter Property="Fill" Value="#00B8FF"/> </Style> <Style TargetType="Path"> <Setter Property="Fill" Value="#FFFF5B00"/> </Style> <Style TargetType="Path"> <Setter Property="Fill" Value="#FF5AA4D4"/> </Style> </telerik:PieSeries.SliceStyles> <telerik:PieDataPoint Value="9"/> <telerik:PieDataPoint Value="3"/> <telerik:PieDataPoint OffsetFromCenter="0.1" Value="3"/> </telerik:PieSeries>