RepositoryItemColorEdit.ColorAlignment Property
Specifies the alignment of the preview color box within the control’s edit region.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v24.2.dll
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 |
---|---|
The color box is not displayed. The color text is aligned to the left. | |
The color box and text are aligned to the left. | |
Only the color box is displayed and it is centered within the edit box. | |
The color box is aligned to the right and the color text is aligned to the left. |