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

SimpleButton.ImageLocation Property

Specifies the image alignment relative to the button.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[Browsable(false)]
[DXCategory("Appearance")]
[DefaultValue(ImageLocation.Default)]
[SmartTagProperty("Image Location", "")]
public virtual ImageLocation ImageLocation { get; set; }

Property Value

Type Default Description
ImageLocation **Default**

A ImageLocation value that specifies the alignment of the button’s image.

Available values:

Name Description
Default

The same as MiddleLeft.

TopCenter

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

TopLeft

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

TopRight

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

MiddleCenter

The image is centered vertically and horizontally. The control’s text is not displayed in this mode.

MiddleLeft

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

MiddleRight

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

BottomCenter

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

BottomLeft

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

BottomRight

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

Remarks

The ImageLocation property allows you to align the image relative to the button. You can also align the image relative to the button’s text using the SimpleButton.ImageToTextAlignment. If the image is aligned relative to the text, the ImageLocation property is not in effect.

The ImageLocation property is equivalent to the ImageOptions.Location property (see SimpleButton.ImageOptions).

See Also