Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ImageLoader.GetEnumValueImageInfo(Object) Method

Supplies metadata on the image associated with an enumeration value.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v24.2.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