RepositoryItemColorEdit.ColorAlignment Property
Specifies the alignment of the preview color box within the control’s edit region.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v21.1.dll
NuGet Packages: DevExpress.Win.Design, 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 |
---|---|
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. |
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ColorAlignment property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.