SfChart chart = new SfChart();
chart.PrimaryAxis = new NumericalAxis();
chart.SecondaryAxis = new NumericalAxis();
Style gridLineStyle1 = new Style(typeof(Line));
gridLineStyle1.Setters.Add(new Setter(Line.StrokeProperty, new
SolidColorBrush(Colors.OrangeRed)));
Style gridLineStyle2 = new Style(typeof(Line));
gridLineStyle2.Setters.Add(new Setter(Line.StrokeProperty, new
SolidColorBrush(Colors.DeepSkyBlue)));
chart.PrimaryAxis.MajorGridLineStyle = gridLineStyle1;
chart.SecondaryAxis.MajorGridLineStyle = gridLineStyle2; |