ImageLoader.GetEnumValueImageInfo(Object) Method

Supplies metadata on the image associated with an enumeration value.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public ImageInfo GetEnumValueImageInfo(
    object enumValue
)
Public Function GetEnumValueImageInfo(
    enumValue As Object
) As ImageInfo

Parameters

Type Name Description
Object enumValue

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;
//...
Image image = ImageLoader.Instance.GetEnumValueImageInfo(MyEnum.FirstValue).Image;
See Also