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. C#获取字符串的拼音和首字母

    在C#中我们想要获取字符串的拼音并不是那么困难的,在网上看到很多都是特别笨的方式来实现,其实各有各的好处吧,如果使用了下方法方式,它不知道多音字,这就是一个问题. /// <summary> ...

  2. Spire.Cloud 在线编辑

    简介 Spire.Cloud在线编辑器是一款基于网页的 Office 文件编辑工具,支持在网页中打开.编辑.打印 Word.Excel.PPT 文件,支持将文档保存到私有云盘.支持 IE.Chrome ...

  3. 浅析 Java 与 C++ 的垃圾回收机制

        Java老师在期末复习大纲上出了一道关于JVM垃圾回收机制的题目,想要我们简述一下JVM垃圾回收机制,与老师交流后,大概老师是希望通过与其他语言在垃圾回收对比,介绍一下Java在这方面的特点和 ...

  4. NET Framework项目移植到NET Core上遇到的一系列坑(2)

    目录 获取请求的参数 获取完整的请求路径 获取域名 编码 文件上传的保存方法 获取物理路径 返回Json属性大小写问题 webconfig的配置移植到appsettings.json 设置区域块MVC ...

  5. JS---封装缓动(变速)动画函数---增加多个任意多个属性

    封装缓动动画函数---增加多个任意多个属性 在原来缓动动画函数,增加任意一个属性的基础上,做了如下改变 1. 原来function animate(element, attr, target),三个变 ...

  6. HA: ISRO Vulnhub Walkthrough

    下载地址: https://www.vulnhub.com/entry/ha-isro,376/ 主机扫描: ╰─ nmap -p- -sV -oA scan 10.10.202.131Startin ...

  7. 2.Android-sdk目录介绍、ADT使用介绍、创建helloworld

    1.android中常用名词介绍 ADT:  ADT为Eclipse的插件.为Eclipse和SDK之间起了一个桥梁的作用. SDK: 软件开发工具包(Soft Development Kit),它为 ...

  8. Android 项目优化(六):项目开发时优化技巧总结

    在之前我们讲了很多能够优化 Android 开发项目质量的方案,这些方案更多的是从一些比较专精的方向切入的,阐述的是一些比较重要且独立的优化方案. 本文我们将总结一下在日常开发过程中我们能够使用的一些 ...

  9. Visual Studio中相对路径中的宏定义

    $(RemoteMachine) 设置为“调试”属性页上“远程计算机”属性的值.有关更多信息,请参见更改用于 C/C++ 调试配置的项目设置. $(References) 以分号分隔的引用列表被添加到 ...

  10. Appium(十):元素定位(加强版)

    1. 元素定位 写完上一篇元素定位的博客,发现实用性基本为零.这几天真的烦死我了,一直在找资料,还去看了一遍appium官网文档.最后结合着selenium的定位方法,测试出几种可行的元素定位方法. ...