Skip to main content
.NET 8.0+

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

EnumDescriptor.GetImageInfo(Object) Method

Supplies metadata on the image associated with a particular value of the enumeration represented by the EnumDescriptor.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public ImageInfo GetImageInfo(
    object value
)

#Parameters

Name Type Description
value 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 value of the enumeration represented by the EnumDescriptor.

#Remarks

The following code snippet illustrates use of the GetImageInfo property. The code retrieves images and display captions associated with MyEnum enumeration values.

//...
EnumDescriptor myDescriptor = new EnumDescriptor(typeof(MyEnum));
foreach(object enumValue in myDescriptor.Values) {
    string caption = myDescriptor.GetCaption(enumValue);
    var image = myDescriptor.GetImageInfo(enumValue).Image;
    //process caption and image
}
See Also