ColorSet ct = new ColorSet(); ct.Id = "MyColorSet"; ct.Brushes.Add(new SolidColorBrush(Colors.Blue)); ColorSet ct2 = new ColorSet(); ct.Id = "MyColorSet2"; ct2.Brushes.Add(new SolidColorBrush(Colors.Brown)); ColorSet ct3 = new ColorSet(); ct.Id = "MyColorSet3"; ct3.Brushes.Add(new SolidColorBrush(Colors.Cyan)); ColorSet ct4 = new ColorSet(); ct.Id = "MyColorSet4"; ct4.Brushes.Add(new SolidColorBrush(Colors.DarkGray)); ColorSet ct5 = new ColorSet(); ct.Id = "MyColorSet5"; ct5.Brushes.Add(new SolidColorBrush(Colors.Gray)); ColorSet ct6 = new ColorSet(); ct.Id = "MyColorSet6"; ct6.Brushes.Add(new SolidColorBrush(Colors.Green)); // Create new instance of ColorSets class chart.ColorSets = new ColorSets(); // Add ColorSet to ColorSets collection chart.ColorSets.Add(ct); chart.ColorSets.Add(ct2); chart.ColorSets.Add(ct3); chart.ColorSets.Add(ct4); chart.ColorSets.Add(ct5); chart.ColorSets.Add(ct6); // Set ColorSet to chart chart.ColorSet = "MyColorSet";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)