ASPxColorEdit.Items Property
In This Article
Gets the collection of items displayed within the default color section of the color table.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public ColorEditItemCollection Items { get; }
#Property Value
Type | Description |
---|---|
Color |
A Color |
#Remarks
Use the Items property to access a collection of items, represented by the ColorEditItem objects, within the color editor. The collection provides methods and properties that allow you to add new items and remove existing ones, access individual items, etc.
This property is a wrapper of the ColorEditProperties.Items property.
#Example
This example demonstrates how to customize the ASPxColorEditor Items collection. The image below shows the result.
using System.Drawing;
protected void Page_Load(object sender, EventArgs e) {
Color color = Color.Empty;
// Create a green palette that contains 24 color items
for (int i = 0; i < 24; i++) {
color = Color.FromArgb(0, i * 256 / 24, 0);
ceGreenPalette.Items.Add(color);
}
}
See Also