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. (Last updated on: November 16, 2018).
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 |
Published Date: July 28, 2015 |
Last Revised Date: May 22, 2019

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.

C#

//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");
}

VB

'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#: http://www.syncfusion.com/downloads/support/directtrac/110822/ze/ColorPickerUIAdv_ColorGroup-308156716

VB: http://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.
ADD COMMENT
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