We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the color group for the selected item in ColorPickerUIAdv?

Platform: WinForms |
Control: ColorPickerUIAdv

In the ColorPickerUIAdv, you can get the color group for the selected item by using the Picked event handler. The property, ActiveGroup helps to get the color group of the selected item in the ColorPickerUIAdv.


The following code example demonstrates the same.


//The event is raised when the ColorItem is picked.
this.colorPickerUIAdv1.Picked += new Syncfusion.Windows.Forms.Tools.ColorPickerUIAdv.ColorPickedEventHandler(colorPickerUIAdv1_Picked);
void colorPickerUIAdv1_Picked(object sender, Syncfusion.Windows.Forms.Tools.ColorPickerUIAdv.ColorPickedEventArgs args)
    // Gets the color group of the selected item.
    MessageBoxAdv.Show(this.colorPickerUIAdv1.ActiveGroup.Name, "Selected ColorGroup");


'The event is raised when the ColorItem is picked.
AddHandler colorPickerUIAdv1.Picked, AddressOf colorPickerUIAdv1_Picked
Private Sub colorPickerUIAdv1_Picked(ByVal sender As Object, ByVal args As Syncfusion.Windows.Forms.Tools.ColorPickerUIAdv.ColorPickedEventArgs)
 ' Gets the color group of the selected item
 MessageBoxAdv.Show(Me.colorPickerUIAdv1.ActiveGroup.Name, "Selected ColorGroup")
End Sub


ColorItem selected on Theme Colors group

Figure 1: ColorItem selected on the Theme Colors


ColorItem selected on Standard Colors group

Figure 2: ColorItem selected on the Standard Colors


ColorItem selected on Recent Colors group

Figure 3: ColorItem selected on the Recent Colors

Sample Links:

C#: https://www.syncfusion.com/downloads/support/directtrac/110822/ze/ColorPickerUIAdv_ColorGroup-308156716

VB: https://www.syncfusion.com/downloads/support/directtrac/110822/ze/ColorPickerUIAdv_ColorGroup_VB-408967402

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile