Specifies the name of the image that is displayed for the target class' objects or target enumeration value.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field | AttributeTargets.Interface, Inherited = false)] public class ImageNameAttribute : Attribute
<AttributeUsage(AttributeTargets.Class Or AttributeTargets.Field Or AttributeTargets.Interface, Inherited:=False)> Public Class ImageNameAttribute Inherits Attribute
In XAF applications, you can associate business objects with images. For instance, these images are displayed in detail form headers. To assign an image to a particular business class, apply the ImageName attribute to this class. Pass the name of the required image as the attribute's imageName parameter. This parameter's value will be set for the IModelClass.ImageName property of the Application Model's BOModel | <Class> node. Note, you can set or change this property's value directly in the Application Model via the Model Editor.
When this attribute is applied to a class, the specified image is displayed in detail forms, navigation control's items and New Action. When the ImageName attribute is applied to an enumeration value, the specified image is displayed by the Property Editors bound to properties of the enumeration type.
The eXpressApp Framework ships with a number of standard images embedded into the DevExpress.ExpressApp.Images assembly. To see the available images, browse the following %PROGRAMFILES(x86)%\DevExpress 20.1\Components\%PROGRAMFILES(x86)%\DevExpress 20.1\.NET Core Desktop Libraries\Sources\DevExpress.Images\Images folder. To assign one of these standard images to a class, pass the name of the image as the ImageName attribute's parameter or use the Model Editor. For details, refer to the Assign a Standard Image topic.
To assign a custom image to a business class, create the Images folder in one of your solution's projects and save the required image to this folder. In the ImageName attribute, pass the image name only (without extension). The required image will be found in the Images folder. For details, refer to the Assign a Custom Image topic.
The image which is set for a business class via the ImageName attribute in code is not inherited.
For details on image managing in XAF, refer to the Add and Override Images topic.