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.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
[Browsable(false)]
[DefaultValue(ImageLocation.MiddleCenter)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual ImageLocation ImageLocation { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Image |
Middle |
A Image |
Available values:
Name | Description |
---|---|
Default | The same as Middle |
Top |
The image is vertically aligned at the top, and horizontally aligned in the center. |
Top |
The image is vertically aligned at the top, and horizontally aligned on the left. |
Top |
The image is vertically aligned at the top, and horizontally aligned on the right. |
Middle |
The image is centered vertically and horizontally. The control’s text is not displayed in this mode. |
Middle |
The image is vertically centered, and horizontally aligned on the left. |
Middle |
The image is vertically centered, and horizontally aligned on the right. |
Bottom |
The image is vertically aligned at the bottom, and horizontally aligned in the center. |
Bottom |
The image is vertically aligned at the bottom, and horizontally aligned on the left. |
Bottom |
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.
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ImageLocation 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.