[Metro] Plot area background

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

Nicothekrug wrote at 2013-04-10 15:44:

Hi,

Is there a way change the background of the plot area only ? (in Metro - The Background property isn't what I want because it changes the whole background of the control, not only the plot area background).

Thanks in advance,

Nicolas

raphay wrote at 2013-04-10 16:32:

I think you can use a rectangle annotation on the entire chart (with no min/max x/y).

Nicothekrug wrote at 2013-04-10 17:09:

Nice idea !

But with this code, the background don't change :
RectangleAnnotation plotBackground = new RectangleAnnotation();
plotBackground.Fill = OxyColors.Pink;
PlotModel.Annotations.Add(plotBackground); 
What am I doing wrong ?

raphay wrote at 2013-04-11 15:20:

Try to update your plotModel and your graphic component...

Nicothekrug wrote at 2013-04-11 15:27:

Already tried it, without better results :(