windowsforms-devexpress-dot-xtraeditors-dot-imageedit.md
Sets or gets the image displayed by the editor.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(null)]
[DXCategory("Appearance")]
public virtual Image Image { get; set; }
<DXCategory("Appearance")>
<DefaultValue(Nothing)>
Public Overridable Property Image As Image
| Type | Default | Description |
|---|---|---|
| Image | null |
A Image object representing the image displayed by the editor.
|
The Image property value is equivelant to the ImageEdit.EditValue property value. The property is declared to avoid type conversion when accessing the image displayed by the editor.
The following example assigns an image to the control.
imageEdit1.Image = Image.FromFile("workspace.png");
ImageEdit1.Image = Image.FromFile("workspace.png")
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Image 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.
winforms-custom-imageedit-with-preview/CS/WindowsApplication3/Main.cs#L19
customEdit1.Image = SystemIcons.Shield.ToBitmap();
}
winforms-custom-imageedit-with-preview/VB/WindowsApplication3/Main.vb#L18
gridControl1.DataSource = GetData()
customEdit1.Image = SystemIcons.Shield.ToBitmap()
End Sub
See Also