Skip to main content
.NET 6.0+

ImageLoader.GetEnumValueImageName(Object) Method

Returns the name of the image associated with an enumeration value.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v23.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public string GetEnumValueImageName(
    object enumValue
)

Parameters

Name Type Description
enumValue Object

The enumeration value for which the associated image name will be retrieved.

Returns

Type Description
String

A string representing the name of the image associated with the specified enumeration value.

Remarks

As an alternative to this method, you can use the ImageInfo.ImageName property of the ImageInfo object returned by the ImageLoader.GetEnumValueImageInfo and EnumDescriptor.GetImageInfo methods.

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

string image = ImageLoader.Instance.GetEnumValueImageName(MyEnum.FirstValue);
See Also