Mrd

Mrd

  • NA
  • 1
  • 887

Custom MarkerStyles possible in C#

Jul 22 2015 3:40 PM

I'm pretty new in C#. working with charts and trying to remove the Markers from my plotted lineseries.

here is the code:

   private void LoadLineChartData()

 { LineSeries ls1 = new LineSeries();         ls1.Title = "Title1";         ls1.IndependentValueBinding = new Binding("Key");         ls1.DependentValueBinding = new Binding("Value");          ls1.ItemsSource = new KeyValuePair<int, int>[]{ new KeyValuePair<int,int>(1, 100), new KeyValuePair<int,int>(2, 130), new KeyValuePair<int,int>(3, 150), new KeyValuePair<int,int>(4, 125), new KeyValuePair<int,int>(5,155) }; MyChart.Series.Add(ls1);         ls1.MarkerStyle = MarkerStyle.None; }

It doesn't work and here is the error: 'System.Windows.Controls.DataVisualization.Charting.LineSeries' does not contain a definition for 'MarkerStyle' and no extension method 'MarkerStyle' accepting a first argument of type '

Do I use a wrong .dll as the reference for charting? what is the right one?