Skip to main content
.NET 6.0+

ImageLoader.GetEnumValueImageInfo(Object) Method

Supplies metadata on the image associated with an enumeration value.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public ImageInfo GetEnumValueImageInfo(
    object enumValue
)

Parameters

Name Type Description
enumValue Object

The enumeration value for which image metada will be retrieved.

Returns

Type Description
ImageInfo

An ImageInfo object supplying metadata on the image associated with the specified enumeration value.

Remarks

To customize metadata returned by the GetEnumValueImageInfo method, handle the ImageLoader.CustomizeImageInfo event.

As an alternative to this method, you can use the EnumDescriptor.GetImageInfo method.

The following code snippet illustrates use of the GetEnumValueImageInfo method. The code retrieves the image associated with the MyEnum.FirstValue enumeration value.

using System.Drawing;
//...
var image = ImageLoader.Instance.GetEnumValueImageInfo(MyEnum.FirstValue).Image;
See Also