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%DocumentsDevExpress Demos 19.2ComponentseXpressApp FrameworkMainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/
您可以在本课中为模型调用的模型编辑器中所做的更改。主演示模块项目。主演示应用程序安装在%PUBLIC%DocumentsDevExpress Demos 19.2ComponentseXpressApp FrameworkMainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/
.