SimpleButton.ImageLocation Property
Specifies the image alignment relative to the button.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
[Browsable(false)]
[DefaultValue(ImageLocation.Default)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual ImageLocation ImageLocation { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Image |
Default | 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
Use the SimpleButton.ImageOptions property to display an image in a button and specify image-related settings.
simpleButton1.Text = "";
simpleButton1.ImageOptions.Image = Image.FromFile(".\\Stars3_1.png");
simpleButton1.ImageOptions.Location = ImageLocation.MiddleCenter;