Skip to main content

LabelControl.ImageAlignToText Property

Gets or sets a value that specifies how the image is aligned relative to the label’s text.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DefaultValue(ImageAlignToText.None)]
[DXCategory("Appearance")]
public ImageAlignToText ImageAlignToText { get; set; }

Property Value

Type Default Description
ImageAlignToText None

An ImageAlignToText value that specifies how the image is aligned relative to the label’s text.

Available values:

Show 13 items
Name Description
None

The image isn’t aligned relative to the label’s text. The alignment of the image is specified by the label’s appearance settings (LabelControlAppearanceObject.ImageAlign).

LeftTop

The image is horizontally aligned on the left and vertically aligned at the top.

ImageAlignment_LeftTop

LeftCenter

The image is horizontally aligned on the left and vertically aligned at the center.

ImageAlignment_LeftCenter

LeftBottom

The image is horizontally aligned on the left and vertically aligned at the bottom.

ImageAlignment_LeftBottom

RightTop

The image is horizontally aligned on the right and vertically aligned at the top.

ImageAlignment_RightTop

RightCenter

The image is horizontally aligned on the right and vertically aligned at the center.

ImageAlignment_RightCenter

RightBottom

The image is horizontally aligned on the right and vertically aligned at the bottom.

ImageAlignment_RightBottom

TopLeft

The image is vertically aligned at the top, and horizontally aligned on the left.

ImageAlignment_TopLeft

TopCenter

The image is vertically aligned at the top, and horizontally aligned at the center.

ImageAlignment_TopCenter

TopRight

The image is vertically aligned at the top, and horizontally aligned on the right.

ImageAlignment_TopRight

BottomLeft

The image is vertically aligned at the bottom, and horizontally aligned on the left.

ImageAlignment_BottomLeft

BottomCenter

The image is vertically aligned at the bottom, and horizontally aligned at the center.

ImageAlignment_BottomCenter

BottomRight

The image is vertically aligned at the bottom, and horizontally aligned on the right.

ImageAlignment_BottomRight

Remarks

Labels can display images. To specify an image use the label’s appearance settings (LabelControl.Appearance). The ImageAlignToText property specifies how the image is aligned relative to the label’s text.

To let the label’s appearance settings control how the image is aligned within the label, set the ImageAlignToText property to the ImageAlignToText.None value. In this instance, the alignment of the image is specified by the LabelControlAppearanceObject.ImageAlign property of the label’s appearance object.

See Also