Background color doesn't change from white in WPF

Mar 19, 2014 at 9:57 AM
Hi

I have started using OxyPlot for a simple graph, but I have a problem regarding setting the background color. It apparently doesn't seem to work ?
The plotAreaBackground is changed correctly.
Even setting it to red, it continues to be white. What I have done is the below:
            plotModel = new PlotModel();
            plotModel.PlotAreaBackground = BackgroundBaseColor.ToOxyColor();
            plotModel.Background = OxyColors.Red;
            DateTimeAxis dateTimeAxis = new DateTimeAxis(AxisPosition.Bottom, "Date", CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern);
            dateTimeAxis.Maximum = DateTimeAxis.ToDouble(DateTime.Today);
            plotModel.Axes.Add(dateTimeAxis);
            
            OxyPlot.MinWidth = ActualWidth;         
            OxyPlot.MaxHeight = ActualHeight;           
            OxyPlot.Model = plotModel;          
            ContainerPanel.Children.Add(OxyPlot);   
I have tried having ContainerPanel both as a stackpanel and grid...

Hope somebody can help.
Coordinator
Mar 19, 2014 at 10:17 PM
Thanks, I see the background of the WPF control was not set by the Background property of the PlotModel. Should be fixed in build 257.
Marked as answer by DennisLer on 3/20/2014 at 12:22 AM