Back to Devexpress

EditorButton.ImageLocation Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-editorbutton-e31a5800.md

latest4.1 KB
Original Source

EditorButton.ImageLocation Property

Specifies the position of the button’s image relative to the text. This member is obsolete. Use the EditorButton.ImageOptions.Location property instead.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
[DefaultValue(ImageLocation.MiddleCenter)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual ImageLocation ImageLocation { get; set; }
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
<DefaultValue(ImageLocation.MiddleCenter)>
<DXCategory("Appearance")>
Public Overridable Property ImageLocation As ImageLocation

Property Value

TypeDefaultDescription
ImageLocationMiddleCenter

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

|

Available values:

NameDescription
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

A button can display text and an image at the same time. The ImageLocation property allows you specify the image position relative to the text.

The button’s text is specified by the EditorButton.Caption property. Text is displayed in the button if the EditorButton.Kind property is set to Glyph , Ellipsis , Delete , OK , Plus , Minus , Redo , Undo or DropDown.

A button can display either a custom image or a predefined image. To display a custom image, set the EditorButton.Kind property to Glyph and specify the image using the EditorButton.ImageOptions property. If the EditorButton.Kind property is set to any other value except Glyph , a corresponding predefined image is displayed.

If the button displays a custom or predefined image, and the ImageOptions.Location property is set to MiddleCenter , the button’s text is hidden and the image is centered.

See Also

Caption

Kind

ImageOptions

EditorButton Class

EditorButton Members

DevExpress.XtraEditors.Controls Namespace