Customize the View Items Layout 自定义视图项目布局
In this lesson, you will learn how to customize the default editor layout in a Detail View. For this purpose, the Contact Detail View will be used.
在本课中,您将学习如何在详细视图中自定义默认编辑器布局。为此,将使用"联系人详细信息"视图。
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) 继承
- 将操作放置在其他位置
Invoke the Model Editor for the MySolution.Module project. Navigate to the Views | MySolution.Module.BusinessObjects node. Expand the Contact_DetailView child node. It contains the Items and Layout child nodes. To view and modify the current layout of the Contact Detail View editors, select the Layout node. The property list to the right will be replaced with a design surface that imitates the Contact Detail View. To modify the editor arrangement, right-click the View's empty space and choose Customize Layout.
调用 MySolution.模块项目的模型编辑器。导航到视图 |MySolution.模块.业务对象节点。展开Contact_DetailView子节点。它包含"项"和"布局"子节点。要查看和修改联系人详细信息视图编辑器的当前布局,请选择"布局"节点。右侧的属性列表将替换为模仿"联系人详细信息视图"的设计图面。要修改编辑器排列,请右键单击视图的空白区域并选择"自定义布局"。
The Customization Form will be invoked. In the invoked form, you can drag editors to the required positions.
将调用自定义窗体。在调用的窗体中,可以将编辑器拖动到所需的位置。
Follow the graphical prompts that indicate the item's new location. In addition, you can remove and restore View Items. Drag the required item from the Detail View to the Customization Form to remove the item, and drag the item from the Customization Form to the Detail View to add it.
按照指示项目新位置的图形提示进行操作。此外,还可以删除和恢复视图项目。将所需项目从"详细信息"视图拖动到"自定义窗体"以删除该项目,并将项目从"自定义窗体"拖动到"详细信息视图"以将其添加。
To view the layout tree for View Items, click the Layout Tree View tab on the Customization Form. You can right click a tree item and invoke a context menu, allowing you to hide the Customization Form, reset the layout, create a tabbed group, etc. (See the image below.)
要查看视图项目的布局树,请单击自定义窗体上的布局树视图选项卡。您可以右键单击树项并调用上下文菜单,从而可以隐藏自定义窗体、重置布局、创建选项卡式组等(请参阅下图)。
To learn more about the Customization form, the Layout Tree View tab and its context menu, refer to the Default Runtime Customization topic.
Close the Customization Form. Run the WinForms or ASP.NET application, and invoke a Contact Detail View. Notice that the editors are arranged as required.
If you want to reset changes, right-click Contact_DetailView | Layout and choose Reset Differences.
要了解有关"自定义"窗体、布局树视图选项卡及其上下文菜单的详细信息,请参阅默认运行时自定义主题。
关闭自定义窗体。运行 WinForms 或ASP.NET应用程序,并调用联系人详细信息视图。请注意,编辑器是按要求排列的。
如果要重置更改,请右键单击Contact_DetailView |布局并选择"重置差异"。
Note 注意
Alternatively, you can customize the Contact Detail View layout at runtime, and then merge these customizations into the MySolution.Module project. Refer to the How to: Merge End-User Customizations into the XAF Solution topic for details.
或者,您可以在运行时自定义联系人详细信息视图布局,然后将这些自定义项合并到 MySolution.模块项目中。有关详细信息,请参阅"如何:将最终用户自定义"合并到 XAF 解决方案主题中。
XAF开发成品案例参考
如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利。
作者博客: http://www.cnblogs.com/foreachlife
欢迎加入CIIP框架\XAF技术应用交流群: 336090194 群文件中有更多相关工具及文档资料
转载请注明出处。多谢!
欢迎加我微信: admiralcn 或扫码:

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端