Assign a Standard Image(分配标准图像)
This lesson explains how to associate an entity class with a standard image from the DevExpress.Images assembly. This image illustrates the entity class in the following sections of the UI:
本课介绍如何将实体类与DevExpress. Images程序集中的标准图像相关联。此图像在UI的以下部分中说明了实体类:
- Navigation control
- Detail View
- List View
The instructions below describe how to assign images to the entity classes in the Model Editor.
下面的说明描述了如何将图像分配给模型编辑器中的实体类。
Step-by-Step Instructions(分步说明)
1.In the MySolution.Module project, open the Model.DesignedDiffs.xafml file in the Model Editor.
在MySolutions. Module项目中,在模型编辑器中打开Model.DesignedDiffs.xafml文件。
2.Navigate to the BOModel | MySolution.Module.BusinessObjects | Employee node. In the Appearance section of the node’s properties, locate the ImageName property and set its value to BO_Employee.
导航到BOModel|MySolutions. Mode.BusinessObjects|员工节点。在节点属性的外观部分中,找到ImageName属性并将其值设置为BO_Employee。
Tip
Focus the ImageName property field and click an ellipsis button that appears to the right of the property value to invoke the Image Picker dialog and browse all available images.
聚焦ImageName属性字段并单击出现在属性值右侧的省略号按钮以调用Image Picker对话框并浏览所有可用图像。
After you change this value, XAF automatically recalculates the values of the following properties:
更改此值后,XAF会自动重新计算以下属性的值:
3.Run the application to see the new image in the UI:
运行应用程序以在UI中查看新图像:
ASP.NET Core Blazor:
Windows Forms:
4.In the same manner, assign images to the following classes:
以同样的方式,将图像分配给以下类:
After you apply the changes, the UI of your application should look as follows:
应用更改后,应用程序的UI应如下所示:
ASP.NET Core Blazor:
Windows Forms:
Next Lesson(下一课)
Reuse Implemented Functionality from Additional Modules
重用附加模块实现的功能