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 属性。

    Tutorial_UIC_Lesson9_1

  • 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应用程序。调用演示任务类的详细信息表单。"主题"属性将通过包含两行的备忘录编辑器显示。

    Tutorial_UIC_Lesson9_2

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/

.

posted @   code first life  阅读(190)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端
点击右上角即可分享
微信分享提示