Skip to main content
A newer version of this page is available. .
Tab

ASPxColorEdit.Items Property

Gets the collection of items displayed within the default color section of the color table.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public ColorEditItemCollection Items { get; }

Property Value

Type Description
ColorEditItemCollection

A ColorEditItemCollection instance that is the collection of items.

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.

ASPxColorEdit_GreenPalette

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