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

RepositoryItemColorEdit.ColorAlignment Property

Specifies the alignment of the preview color box within the control’s edit region.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v22.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(HorzAlignment.Near)]
[DXCategory("Behavior")]
public HorzAlignment ColorAlignment { get; set; }

Property Value

Type Default Description
HorzAlignment Near

A HorzAlignment value specifying the alignment of the preview color box within the control’s edit region.

Available values:

Name Description
Default

Places an object or text at the default position, which is determined by a control.

Near

Places an object/text at a near position.

Center

Centers an object or text within a region.

Far

Places an object/text at a far position.

Remarks

The ColorAlignment property controls the alignment of the preview color box and text within the control’s edit region. You can align the color box to the left, right or center it. If the color box is centered, the color text is not displayed.

The following table shows how ColorAlignment affects the edit box.

ColorAlignment value

Image

HorzAlignment.Default

The color box is not displayed. The color text is aligned to the left.

ColorEdit_ColorAlignment_Default

HorzAlignment.Near

The color box and text are aligned to the left.

ColorEdit_ColorAlignment_Near

HorzAlignment.Center

Only the color box is displayed and it is centered within the edit box.

ColorEdit_ColorAlignment_center

HorzAlignment.Far

The color box is aligned to the right and the color text is aligned to the left.

ColorEdit_ColorAlignment_Far

See Also