eXpressApp Framework (XAF) includes standard images embedded into the DevExpress.Images assembly. In this lesson, you will learn how to associate a business class with a standard image. This image will represent the class in the navigation control, including detail and list form headers. For this purpose, the Department and Position classes will be used, since their ancestor (BaseObject class) is not associated with an image.

eXpressApp 框架 (XAF) 包括嵌入到 DevExpress.Images 程序集中的图标。在本课中,您将学习如何将业务类与标准图像相关联。此图像将表示导航控件中的类,包括详细信息和列表窗体标头。为此,将使用"部门和位置"类,因为它们的祖先(BaseObject 类)不与图像关联。

To see the available images, browse the following folder: %PROGRAMFILES(x86)%\DevExpress 19.2\Components\Sources\DevExpress.Images\Images.

要查看可用图像,请浏览以下文件夹%PROGRAMFILES(x86)%\DevExpress 19.2\Components\Sources\DevExpress.Images\Images.

Note 注意

Before proceeding, take a moment to review the Place an Action in a Different Location lesson.

Follow the steps below to assign images to the Department and Position classes.

在继续之前,请花点时间复习"将操作置于不同位置"课程。
按照以下步骤将图像分配给部门和职位类。

  • Invoke the Model Editor for your WinForms or ASP.NET application project.

  • Navigate to the NavigationItems node, and set ShowImages to true.

  • For WinForms applications, also set the ShowTabImage property to true in the Options node.

  • Images are now displayed for business classes. The "BO_Unknown" image is shown for classes that have no preassigned image.

  • 调用 WinForms 的模型编辑器或ASP.NET应用程序项目。
  • 导航到导航项节点,并将显示图像设置为 true。
  • 对于 WinForms 应用程序,还将"选项"节点中的 ShowTabImage 属性设置为 true。
  • 现在为业务类显示图像。对于没有预分配图像的类,将显示"BO_Unknown"图像。

  • Invoke the Model Editor. Navigate to the BOModel | MySolution.Module.Business_Classes | Department node and change the ImageName property value to "BO_Department". This is the name of the image in the %PROGRAMFILES(x86)%\DevExpress 19.2\Components\Sources\DevExpress.Images\Images folder. This folder represents a Standard Image Library.

调用模型编辑器。导航到 BOModel |MySolution.模块.Business_Classes |部门节点并将 ImageName 属性值更改为"BO_Department"。这是%PROGRAMFILES(x86)%\DevExpress 19.2\Components\Sources\DevExpress.Images\Images folder. This folder represents a Standard Image Library.

Note 注意
  • When the ImageName property is focused, the ellipsis button () is displayed to the right of the property value. You can click this button to invoke the Image Picker dialog and browse the available images.
  • Navigate to the BOModel | MySolution.Module.Business_Classes | Position node and change the ImageName property value to "BO_Position".

  • 聚焦 ImageName 属性时,省略号按钮 (EllipsisButton) 将显示在属性值的右侧。可以单击此按钮以调用"图像选取器"对话框并浏览可用图像。

  • 导航到 BOModel |MySolution.模块.Business_Classes |定位节点并将 ImageName 属性值更改为"BO_Position"。

  • Run the application. You will see that Department and Position now have corresponding images displayed within the navigation bar and tab panel. If you run the ASP.NET application, you will see similar images within the page header when the Department (or Position) List View or Detail View is active.

  • 运行应用程序。您将看到"部门和位置"现在在导航栏和选项卡面板中显示相应的图像。如果运行ASP.NET应用程序,当"部门(或位置)列表视图"或"详细信息视图"处于活动状态时,将在页眉中看到类似的图像。

WinForms Application

WinForms 应用程序

ASP.NET Application

ASP.NET应用程序

You can see the results in the Main Demo | MainDemo.Module project's Model Editor. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

您可以在主演示中看到结果 |MainDemo.模块项目的模型编辑器。主演示应用程序安装在%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

.

Assign a Standard Image 设置图标的更多相关文章

  1. Assign a Custom Image 设置自定义图标

    In this lesson, you will learn how to associate a business class with a custom image. This image wil ...

  2. IOS基础之设置APP的名字、设置图标、添加等待加载时的图片

    1.我们的app一般默认的名字是我们的工程名字,所以我们一般会更改一个更加友好的名字,更改的方法如下图: 找到InfoPlist.strings文件,在里面添加语句CFBundleDisplayNam ...

  3. 自定义View 可清除内容、设置图标、下划线的输入框 MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  4. Creating Dialogbased Windows Application (3) / 创建基于对话框的Windows应用程序(三)Checkbox的应用、窗体置顶、设置图标 / VC++, Windows

    创建基于对话框的Windows应用程序(三) —— Checkbox的应用.窗体置顶.设置图标 上一节创建的窗体应用程序中,我们用到了Button和StaticText这两个控件.这一节中我们将学习使 ...

  5. DevExpress的TreeList怎样给树节点设置图标

    场景 DevExpress的TreeList怎样设置数据源使其显示成单列树形结构: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/ ...

  6. Appscan standard怎么设置外部浏览器为IE

    Appscan standard怎么设置外部浏览器为IE   方法/步骤     首先,打开一个的Appscan 的界面中,点击菜单中的 工具 的选项   点击了工具的选项之后,弹出了下拉菜单选中为 ...

  7. NuGet 如何设置图标

    在找 NuGet 的时候可以看到有趣的库都有有趣的图标,那么如何设置一个 NuGet 的图标 在开始之前,请在nuget官方网站下载 NuGet.exe 同时设置环境变量 环境变量设置的方法就是将 N ...

  8. 使用伪类(::before/::after)设置图标

    使用伪类(::before/::after)设置文本前后图标.减少标签的浪费,使页面更加整洁. 如图: <!DOCTYPE html> <html> <head> ...

  9. Android Studio 如何在TextView中设置图标并按需调整图标大小

    •任务 相信大家对这张图片都不陌生,没错,就是 QQ动态 向我们展示的界面. 如何实现呢? •添加文字并放入图标 新建一个 Activity,取名为 QQ,Android Studio 自动为我们生成 ...

随机推荐

  1. 使用mongoshake进行oplog同步读取,解决乱码问题

    mongoshake 是个开源的用户mongo数据迁移和同步的工具,支持往各种目标源头写数据 具体:https://github.com/alibaba/MongoShake 有业务场景想把oplog ...

  2. mybatis源码学习(二)--mybatis+spring源码学习

    这篇笔记主要来就,mybatis是如何利用spring的扩展点来实现和spring的整合 1.mybatis和spring整合之后,我们就不需要使用sqlSession.selectOne()这种方式 ...

  3. AOP框架Dora.Interception 3.0 [4]: 基于特性的拦截器注册

    按照单一职责的原则,拦截器只负责需要的拦截操作的执行,至于它采用何种方式应用到目标方法上,以及它在整个拦截器管道中的位置则属于“拦截器注册”的范畴.Dora.Interception提供了几种典型的注 ...

  4. LeetCode 11月第2周题目汇总

    开源地址:点击该链接 前言 最近比较忙,这周几乎没有刷题,只刷了6道题~ 题目汇总 0387_first_unique_character_in_a_string类似的题目比较多了,字符串中找出特别的 ...

  5. Java面试题_第三阶段(Spring、MVC、IOC、AOP、DI、MyBatis、SSM、struts2)

    1.1 何为Spring Bean容器?Spring Bean容器与Spring IOC 容器有什么不同吗? 答:1)用于创建bean对象,管理bean对象的那个容器. 2)Spring IOC 容器 ...

  6. NGUI 源码分析- UIWidgetInspector

    NGUI Version 3.9.0 //---------------------------------------------- // NGUI: Next-Gen UI kit // Copy ...

  7. css3 中的渐变

    虽说css3 都已经使用多年了,但是关于css3的渐变用的很少.今天遇见了,就学习了一下. 首先我们打开ps,新建一个画布,选择渐变工具,这个时候我们能够看到顶栏上面的渐变类型如下 第一个我们选中的是 ...

  8. 备份下ESP8266的AT指令集手册和用例手册中文版,准备为V7做几个ESP8266的例子

    指令集手册:https://files.cnblogs.com/files/armfly/4a-esp8266_at_instruction_set_cn.rar 用例手册: https://file ...

  9. js 日期格式化小问题

    看一个图 toLocaleString 的格式是 yyyy/MM/d , 想要 yyyy/MM/dd, toISOString 的格式基本满足, 本想直接 split("T"),  ...

  10. 再窥R(包括一个R示例)

    一.将输出作为输入——结果的重用 R有个特点,分析的结果可以保存下来,并可以作为进一步分析的输入使用.下面我们通过R中的预先安装好的数据集作为实例(这里只讲述原理,涉及到的统计知识,以后在另外的统计专 ...