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.

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.

    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.

    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 18.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/.

 

Next Lesson: Localize UI Elements

See Also