Customize the View Items Layout view custom layout project

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.

In this lesson, you will learn how to customize the default layout editor in the detail view. To do this, we use the "Contact Details" view.

 

Note 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

note

Before proceeding, please take a moment to review the following courses.

  • (XPO / EF) business class inherits from the class library
  • The operation in other locations

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.

Call MySolution. Model Editor module project. Navigate to view |.. MySolution module business object node. Expand Contact_DetailView child nodes. It contains the "item" and "Layout" sub-node. To view and modify the current layout editor contact details view, select "Layout" node. Attribute list is replaced to mimic the right "Contact Details View" design surface. To modify the arrangement editor, right-click an empty area of ​​the view and select the "custom layout."

Tutorial_UIC_Lesson21_1

The Customization Form will be invoked. In the invoked form, you can drag editors to the required positions.

Calls the custom form. In the form of calls, the editor can be dragged to the desired position.

Tutorial_UIC_Lesson21_2

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.)

要查看视图项目的布局树,请单击自定义窗体上的布局树视图选项卡。您可以右键单击树项并调用上下文菜单,从而可以隐藏自定义窗体、重置布局、创建选项卡式组等(请参阅下图)。

Tutorial_UIC_Lesson21_3

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 |布局并选择"重置差异"。

Tutorial_UIC_Lesson21_4

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.

Or you can customize at runtime contact details view layout, and then merge these customizations to MySolution. Module project. For more information, see "How to: end-user-defined" Merge to XAF solution topic.

Guess you like

Origin www.cnblogs.com/foreachlife/p/Customize-the-View-Items-Layout.html