(WinRT) Styling a PieSeries in XAML

Mar 12, 2013 at 10:38 AM

I'm trying to use a PieSeries in XAML, so that I can bind the values of the PieSlices directly to properties, letting me wrap the entire thing in a UserControl.

I'm having trouble specifying the Fill property. OxyColor does not support conversion from a string, and I can't stick one in a page resource because XAML does not support conversion from string to bytes (required to specify the R, G and B values of the colour).

Here is the XAML (where metro: is OxyPlot.Metro, and oxy is OxyPlot)
     <metro:Plot Width="50" Height="50">
                    <oxy:PieSeries InnerDiameter="0.7"
                            <oxy:PieSlice Value={Binding Progress} Fill="???"/>
                            <oxy:PieSlice Value={Binding ProgressComp}/>
I wrote a converter to convert a Color to an OxyColor (and then assigning the value to the Fill property of the slice), but I receive a XamlParseException: Unable to assign to property 'Fill' at runtime.

Any help?