Modify Foreground/background of ContextMenu

May 7, 2010 at 3:51 PM

I'm looking to modify the foreground color of my contextmenu that I'm using with ChartPlotter.  Can anyone give me some advice, I'm looking to do this in code as that is where I'm creating this plotter to be viewed in my WPF.

 

            ChartPlotter plotter = new ChartPlotter();
            plotter.Children.Add(new Header()
            {
                Content = new TextBlock()
                {
                    Text = parametername,
                    Margin = new Thickness(10),
                    FontWeight = FontWeights.Bold
                }
            });
            plotter.Children.Remove(plotter.Legend);
            (plotter.MainVerticalAxis as NumericAxis).ShowMinorTicks = false;
            (plotter.MainVerticalAxis as NumericAxis).
                AxisControl.TicksPath.Stroke = new SolidColorBrush(Colors.LightGray);
            (plotter.MainHorizontalAxis as NumericAxis).ShowMinorTicks = false;
            (plotter.MainHorizontalAxis as NumericAxis).
                AxisControl.TicksPath.Stroke = new SolidColorBrush(Colors.LightGray);

            switch (type)
            {
                case DisplayType.Profile:
                    CreateProfileView(plotter, parameterindex, data, false);
                    break;
                case DisplayType.Spots:
                    CreateSpotsView(plotter, parameterindex, data, false);
                    break;
                case DisplayType.Numbers:
                    CreateTextView(plotter, parameterindex, data, false);
                    break;
                case DisplayType.Map:
                    CreateMapView(plotter, parameterindex, data, false);
                    break;
            }