How to set the custom color in ColorUI Control?
You can refer to the following steps to add custom colors in ColorUIControl.
1)Perform right click on empty cell.
2)Select color and add to ColouUIControl.
3)And now it can be used in ColorUIControl.
C#
this.colorUIControl1.SelectedColorGroup = Syncfusion.Windows.Forms.ColorUISelectedGroup.UserColors;
// To set the color for individual cells
this.colorUIControl1.UserCustomColors(0) = Color.DeepPink;
this.colorUIControl1.UserCustomColors(1) = Color.Blue;
// To set the color
int i = 0;
while ((i < this.colorUIControl1.UserCustomColors.Count))
{
this.colorUIControl1.UserCustomColors(i) = Color.FromArgb((i * 15), 0, 0);
i = (i + 1);
}
VB
Me.colorUIControl1.SelectedColorGroup = Syncfusion.Windows.Forms.ColorUISelectedGroup.UserColors 'To set the color for individual cells Me.colorUIControl1.UserCustomColors(0) = Color.DeepPink Me.colorUIControl1.UserCustomColors(1) = Color.Blue 'To set the color Dim i As Integer = 0 While (i < Me.colorUIControl1.UserCustomColors.Count) Me.colorUIControl1.UserCustomColors(i) = Color.FromArgb((i * 15), 0, 0) i = (i + 1) End While
Sample: