Skip to main content
All docs
V24.1

DXImage Class

Base class for images in DevExpress controls.

Namespace: DevExpress.Drawing

Assembly: DevExpress.Drawing.v24.1.dll

NuGet Package: DevExpress.Drawing

Declaration

[TypeConverter(typeof(DXImageTypeConverter))]
public abstract class DXImage :
    IDisposable,
    IEquatable<DXImage>

Remarks

The following code examples create an image object from source:

  • To use an image locally:

    using (FileStream source = new FileStream(sourceFile, FileMode.Open))
    {
        using (DXImage image = DXImage.FromStream(source))
        {
            // USE AN IMAGE HERE
        }
    }
    
  • To use the image globally, you do not have to dispose of either the stream or the image:

    DXImage image = DXImage.FromStream(new FileStream(sourceFile, FileMode.Open));
    

    Important

    Do not confuse the DXImage class with the DXImage component.

Inheritance

See Also