Skip to content

Latest commit

 

History

History
92 lines (60 loc) · 2.7 KB

File metadata and controls

92 lines (60 loc) · 2.7 KB
layout post
title Customization Settings in WinForms ColorPickerDropDown | Syncfusion®
description Learn about Customization Settings support in Syncfusion® Windows Forms Color Picker DropDown (ColorPickerButton) control and more details.
platform windowsforms
control ColorPickerButton
documentation ug

Customization Settings in Windows Forms Color Picker DropDown

ColorPickerButton displays the ColorUIControl as its dropdown. ColorPickerButton has properties to customize the ColorUIControl. Refer the User Guide for ColorUIControl. The size for the dropdown, i.e, ColorUIControl can be set using ColorUISize property.

{% tabs %} {% highlight c# %}

this.colorPickerButton1.ColorUISize = new System.Drawing.Size(250, 280);

{% endhighlight %}

{% highlight vb %}

Me.colorPickerButton1.ColorUISize = New System.Drawing.Size(250, 280)

{% endhighlight %} {% endtabs %}

Windows Forms ColorPickerButton showing the dropdown

ColorPicker Appearance

The appearance and behavior of the ColorPickerButton can be controlled using the below properties.

ColorPickerButton Properties Description
SelectedAsBackColor Specifies whether the SelectedColor is set as the button backcolor.
SelectedAsText Specifies whether the SelectedColor is set as the button text value.

{% tabs %} {% highlight c# %}

this.colorPickerButton1.SelectedAsBackcolor = true; this.colorPickerButton1.SelectedAsText = true;

{% endhighlight %}

{% highlight vb %}

Me.colorPickerButton1.SelectedAsBackcolor = True Me.colorPickerButton1.SelectedAsText = True

{% endhighlight %} {% endtabs %}

Windows Forms ColorPickerButton showing selected color as in control text

Visual Style

The ColorPickerButton control supports visual style such as Office2016White,Office2016Black,Office2016DarkGray,Office2016Colorful,Default and Metro. This style can be set using Appearance property.

{% tabs %} {% highlight c# %}

this.colorPickerButton1.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Colorful;

{% endhighlight %}

{% highlight vb %}

Me.colorPickerButton1.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Colorful;

{% endhighlight %} {% endtabs %}

Windows Forms ColorPickerButton showing style of Office2016Colorful

{% seealso %}

Color Groups,Tab Text, ColorUIControlAppearance.

{% endseealso %}