Getting Started with Windows Forms Color Picker (ColorPickerUIAdv)
11 Oct 20223 minutes to read
This section briefly describes how to create a new Windows Forms project in Visual Studio and add ColorPickerUIAdv with its basic functionalities.
Refer to the Control Dependencies section to get the list of assemblies or details of NuGet package that needs to be added as reference to use the control in any application.
Click NuGet Packages to learn how to install nuget packages in Windows Forms application.
Adding the ColorPickerUIAdv control via designer
Create a new Windows Forms application in Visual Studio.
The ColorPickerUIAdv control can be added to an application by dragging it from the toolbox to design view. The following dependent assemblies will be added automatically:
Adding the ColorPickerUIAdv control via code
It can be added programmatically by performing the following steps.
Create a C# or VB application via Visual Studio.
Add the following assembly references to the project:
Include the required namespace.
Create an instance of ColorPickerUIAdv, and add it to the form.
private Syncfusion.Windows.Forms.Tools.ColorPickerUIAdv colorPickerUIAdv1; ColorPickerUIAdv cpa = new ColorPickerUIAdv(); cpa.Size = new Size(200, 180); this.Controls.Add(cpa);
Private colorPickerUIAdv1 As Syncfusion.Windows.Forms.Tools.ColorPickerUIAdv Private cpa As ColorPickerUIadv = New ColorPickerUIadv() Private cpa.Size = New Size(200, 180) Me.Controls.Add(cpa)
At run time, a particular color should be focused or selected by using the SelectedColor property.
this.colorPickerUIAdv1.SelectedColor = System.Drawing.Color.White;
Me.colorPickerUIAdv1.SelectedColor = System.Drawing.Color.White