| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 
 |  
   Dim palette As ResourceDictionaryCollection = New ResourceDictionaryCollection()
 
        For i As Integer = 0 To 1
            Dim r As Byte
            Dim g As Byte
            Dim b As Byte
 
            If (i = 0) Then
                r = Convert.ToByte(255)
                g = Convert.ToByte(0)
                b = Convert.ToByte(0)
            Else
                r = Convert.ToByte(0)
                g = Convert.ToByte(255)
                b = Convert.ToByte(0)
            End If
 
 
            Dim style As Style = New Style()
            style.Setters.Add(New Setter(BackgroundProperty, New SolidColorBrush(Color.FromArgb(255, r, g, b))))
            Dim dictionary As ResourceDictionary = New ResourceDictionary()
            dictionary.Add("DataPointStyle", style)
            palette.Add(dictionary)
        Next
 
         monChart.Palette = palette | 
Partager