Introduction
In version 2007.10 of X-Component packages (3 rich libraries of UI controls for .NET with MAC style, XP style...), there are many
color controls with advance features. I show here how to develop one of these color controls with source code of Color Palette control.
<st1:place w:st="on">Main Features:
- You can
change cell number in top side of control.
- You can
change cell number in bottom side of control. .
- You can
change cell size.
- You can
change left color.
- You can
change right color.
- Cell color
tool tip.
To explore features of this Color control, just download
and run the Demo program.
Control Properties
Property
| Description
|
DarkColor
| Gets or sets the dark color of this
control.
|
EdgeSize
| Gets or sets size of the cell edge in pixel.
|
LightColor
| Gets or set the light color of this control.
|
LowerEdgeCount
| Gets or sets the number of the lower edges connected to
the graph vertex (undirected graph)
|
SelectedColor
| Gets the color which is selected.
|
UpperEdgeCount
| Gets or sets the number of the upper edges connected to
the graph vertex (undirected graph)
|
Control Methods
Methods
| Description
|
ClearSelected
| Unselects all items in this control.
|
Control Events
Event
| Description
|
ColorCellSelected
| Occurs when a color cell is selected.
|
Using The Control
+ Download the source code and unzip it.
+ Open VS.NET's Tool menu and select "Add/Remove
ToolBox Items".
+ Click "Browse", and navigate to the ColorPaleteControl.dll
in the bin\Release directory of the source code.
+ Click Open and then OK, the ColorPalette control
will now be in your ToolBox. Just drag the control onto your form to use it.
+ Set the control's properties, and coding an event handle,
and you press F5 to run your program.
Conclusion
I hope others find this control useful. Please feel free to
report errors, issues, or requests.