In this lesson, you will learn how to format the caption of a detail form that displays a business object. For this purpose, the caption of a Contact object's detail form will be specified via the BOModel | Contact node's ObjectCaptionFormat property.

在本课中,您将学习如何设置显示业务对象的详细信息窗体的标题的格式。为此,将通过 BOModel |联系人节点的"对象标题格式"属性。

Note 注意

Before proceeding, take a moment to review the following lessons.

  • Inherit from the Business Class Library Class (XPO/EF)
  • Place an Action in a Different Location

在继续之前,请花点时间复习以下课程。

  • 从商务舱库类 (XPO/EF) 继承
  • 将操作放置在其他位置

By default, the class' default property value is used in the detail form caption. The FullName property is the Person class' default property (specified via the DefaultProperty attribute). As the Contact class is inherited from Person (see Inherit from the Business Class Library's Class (XPO, EF)), the FullName property is also the default property in the Contact class.

默认情况下,类的默认属性值在详细信息窗体标题中使用。FullName 属性是 Person 类的默认属性(通过默认属性属性指定)。由于联系人类是从 Person 继承的(请参阅从商务舱库的类继承(XPO、EF)),因此 FullName 属性也是联系人类中的默认属性。

Perform the following steps to specify the custom caption format.

  • Invoke the Model Editor by double-clicking the Model.DesignedDiffs.xafml file in the MySolution.Module project.
  • In the Model Editor, navigate to the BOModel | MySolution.Module.BusinessObjects node. Select the Contact node, which defines the Contact business class. To the right, the class settings are represented by properties.
  • Replace the default value of the ObjectCaptionFormat property with "{0:FullName} from the {0:Department}".

执行以下步骤来指定自定义字幕格式。

  • 通过双击"模型.设计Diffs.xafml"文件来调用模型编辑器。
  • 在模型编辑器中,导航到 BOModel |MySolution.模块.业务对象节点。选择"联系人"节点,该节点定义"联系人"业务舱。在右侧,类设置由属性表示。
  • 将 ObjectCaptionFormat 属性的默认值替换为 {0}0:部门}中的"{0}:FullName}"。
Note     注意

When setting the object caption format, you can explicitly specify the format string. For instance, {0:ArticleNo:0000,00#} or {0:PeriodDateValue:MM.yyyy}. For more information about formatting, refer to the Format Specifiers topic.

设置对象标题格式时,可以显式指定格式字符串。例如,{0:文章No:0000,00}或{0:_sDateValue值:MM.yyyy}。有关格式设置的详细信息,请参阅格式指定器主题。

  • Run the WinForms or ASP.NET application. Invoke a detail form for a Contact object. The caption must be set to a value, as shown in the following image.

  • 运行 WinForms 或ASP.NET应用程序。调用联系人对象的详细信息窗体。标题必须设置为值,如下图所示。

You can see the changes made in this lesson in the Model Editor invoked for the Model.DesignedDiffs.xafml file located in the Main Demo | MainDemo.Module project. 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/

您可以在本课中为模型调用的模型编辑器中所做的更改。主演示模块项目。主演示应用程序安装在%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/

.

Note

You can use the ObjectCaptionFormatAttribute to specify the object caption in code.

Format a Business Object Caption 设置业务对象标题的格式的更多相关文章

  1. SAP中的BOPF(Business Object Processing Framework)

    希望简化你的业务应用开发过程?业务对象处理框架(Business Object Processing Framework,以下简称BOPF)也许可以帮到你. BOPF是SAP Business Sui ...

  2. ABAP术语-BOR (Business Object Repository )

    BOR (Business Object Repository ) 原文:http://www.cnblogs.com/qiangsheng/archive/2007/12/25/1013523.ht ...

  3. Format a Property Value 设置属性值的格式

    In this lesson, you will learn how to set a display format and an edit mask to a business class prop ...

  4. 在C#中,Windows Console控制台 设置控制台标题、禁用关闭按钮、关闭快速编辑模式、插入模式

    设置控制台标题 禁用关闭按钮 关闭快速编辑模式 关闭插入模式 设置控制台标题.禁用关闭按钮 #region 设置控制台标题 禁用关闭按钮 [DllImport("user32.dll&quo ...

  5. ABAP术语-Business Object Type

    Business Object Type 原文:http://www.cnblogs.com/qiangsheng/archive/2008/01/10/1033480.html Generic de ...

  6. ABAP术语-Business Object Builder

    Business Object Builder 原文:http://www.cnblogs.com/qiangsheng/archive/2008/01/09/1031357.html Tool fo ...

  7. ABAP术语-Business Object

    Business Object 原文:http://www.cnblogs.com/qiangsheng/archive/2008/01/07/1028364.html Represents a ce ...

  8. React项目动态设置title标题

    在React搭建的SPA项目中页面的title是直接写在入口index.html中,当路由在切换不用页面时,title是不会动态变化的.那么怎么让title随着路由的切换动态变化呢?1.在定义路由时增 ...

  9. VBA在WORD中给表格外的字体设置为标题

    使用VB可以将表外的字体设置标题字体实际操作如下: VB代码如下: Sub oliver_1() Selection.EndKey Unit:=wdStory '光标移到文末 To ActiveDoc ...

随机推荐

  1. VS2019 开发Django(十)------JavaScript与Django的数据交互

    导航:VS2019开发Django系列 这一篇介绍如何使用BootStrap Table这个组件来绑定渲染数据, 1)先来看一下BootStrap Table是怎么绑定数据的. 通过数据属性 给定da ...

  2. Dubbo环境搭建-ZooKeeper注册中心

    场景 Dubbo简介与基本概念: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/103555224 注: 博客: https:// ...

  3. 微信 电脑版 HOOK(WeChat PC Hook)- 远程线程注入dll原理

    Windows加载dll的特性 1.Windows系统中,每个exe软件运行的时候,会加载系统模块kernel32.dll 2.所有加载进exe软件的系统模块kernel32.dll,内存地址都是一样 ...

  4. 替换空格(剑指offer_5)

    题目描述: 将一个字符串中的空格替换成"%20". Input: "A B" Output: "A%20B" 解题思路: 在字符串尾部填充任 ...

  5. js的动态表格的增删改查思路

    1. 首先我们要知道,动态添加,肯定不是 在页面上写死得,而是通过js调用循环放入到页面上的,我们在写动态表格的时候不要先着急写,我们第一步要做的就是构思,要把自己的逻辑先弄清楚,不然的话,前面是好写 ...

  6. Java基础语法06-面向对象-继承

    七.继承 多个类中存在相同属性和行为时,将这些内容抽取到单独一个类中,那么多个类中无需再定义这些属性和行为,只需要和抽取出来的类构成继承关系. 继承的好处 提高代码的复用性. 提高代码的扩展性. 类与 ...

  7. 详解串行通信协议及其FPGA实现

    前言 好久没更新博客了,这篇文章写写停停,用了近一周的时间,终于写完了.本篇文章介绍,串口协议数据帧格式.串行通信的工作方式.电平标准.编码方式及Verilog实现串口发送一个字节数据和接收一个字节数 ...

  8. 极客时间-vue开发实战学习(ant-design vue作者)

    vue基础 属性 事件 插槽 指令(Directives) 生命周期 底层原理 vue生态 路由管理器vue Router 状态管理器vuex 同构Nuxt vue实战 实战项目-ant-desing ...

  9. Java并发J.U.C学习总结

    转载自http://www.cnblogs.com/chenpi/结合自己理解稍有添加自己的理解 阅读目录 JSR 166及J.U.C Executor框架(线程池. Callable .Future ...

  10. 记一次在node.js中使用crypto的createCipheriv方法进行加密时所遇到的坑

    Node.js的crypto模块提供了一组包括对OpenSSL的哈希.HMAC.加密.解密.签名,以及验证等一整套功能的封装.具体的使用方法可以参考这篇文章中的描述:node.js_crypto模块. ...