Use a Multiline Editor for String Properties 对字符串属性使用多行编辑器
In this lesson, you will learn how to display a multiline editor for string properties. For this purpose, the Task.Subject property will be used. By default, it is displayed via a single-line text box.
在本课中,您将学习如何显示字符串属性的多行编辑器。为此,将使用 Task.Subject 属性。默认情况下,它通过单行文本框显示。
Note 注意
Before proceeding, take a moment to review the Place an Action in a Different Location lesson.
在继续之前,请花点时间复习"将操作置于不同位置"课程。
- Invoke the Model Editor for the MySolution.Module project. Navigate to the BOModel | DevExpress.Persistent.BaseImpl | Task | OwnMembers node and select the Subject child node. To the right, you will see properties that represent the Subject property's settings.
- Set the RowCount property to "2". This means that a two-line editor will be created for the Subject property.
-
Set the Size property to "200". This means that an entry of 200 symbols will be allowed in the two-line editor. Alternatively, you can apply the Size attribute in code.
-
调用 MySolution.模块项目的模型编辑器。导航到 BOModel |开发快车.持久.基础任务 |拥有成员节点并选择主题子节点。在右侧,您将看到表示"主题"属性设置的属性。
-
将 RowCount 属性设置为"2"。。这意味着将为"主题"属性创建双行编辑器。
-
将 Size 属性设置为"200"。。这意味着在双行编辑器中将允许输入 200 个符号。或者,您可以在代码中应用 Size 属性。
-
Run the WinForms or ASP.NET application. Invoke a detail form for a DemoTask class. The Subject property will be displayed via a memo editor that contains two lines.
-
运行 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/
.
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客户端