'宣言 Public Property CustomColors As Infragistics.Win.CustomColor()
public Infragistics.Win.CustomColor[] CustomColors {get; set;}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.UltraColorPicker1.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid Me.UltraColorPicker1.ButtonAppearance.BackColor = Color.Blue ' Display varying shades of yellow in custom area. Dim i As Integer = 0 For i = 0 To 15 Me.UltraColorPicker1.CustomColors(i).Color = Color.FromArgb(255, 255, 15 * i) Next i End Sub
private void Form1_Load(object sender, System.EventArgs e) { this.ultraColorPicker1.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid ; this.ultraColorPicker1.ButtonAppearance.BackColor = Color.Blue; // Display varying shades of yellow in custom area. for(int i = 0; i < 16; i++) this.ultraColorPicker1.CustomColors[i].Color = Color.FromArgb(255,255,15*i); }