Add an Item to the Navigation Control to add an item to the navigation controls

In this lesson, you will learn how to add an item to the navigation control. For this purpose, the Note business class from the Business Class Library will be used.

In this lesson, you will learn how to add items to the navigation controls. For this reason, the use of business class library Note business class.

Note Note
Before proceeding, we recommend that you review the following lessons:
Before proceeding, we recommend that you review the following courses:
  • Place an Action in a Different Location
  • Add a Class from the Business Class Library and Use the Scheduler Module (XPO/EF)
  • The operation in other locations
  • Add Class from Business Class library and use the Scheduler module (XPO / EF)

 

  • If the Note class is not used as an ancestor in your code, you will need to add it to the UI generation process. To do this, use the Module Designer. In the Exported Types pane, focus the Referenced assemblies | DevExpress.Persistent.BaseImpl.v19.2 | Note item and press the space bar. Refer to the Add a Class from the Business Class Library (XPO) lesson for details.
  • The XAF application's navigation structure is defined by the NavigationItems node in the Application Model. To customize the navigation, invoke the Model Editor by double-clicking the Model.DesignedDiffs.xafml file in the MySolution.Module project. In the tree view, navigate to the NavigationItems | Items | Default | Items node. To add a child item to the required navigation item, right-click the Items node and select Add… | NavigationItem from the invoked context menu.

  • Note if the class is not used in the code ancestors, it is necessary to add it to the UI generation process. To do this, use the module designer. "Export Type" pane, focusing referenced assemblies | Express lasting development .BaseImpl.v19.2 |. Write down the item and press the space bar. For more information, see Adding courses from Business Class Libraries (XPO) in.

  • XAF navigation structure of the application defined by the application navigation item node model. To customize navigation, please double-click "model. Design Diffs.xafml" file calls the Model Editor in MySolution. Module project. In the tree view, navigate to the navigation item | item | defaults | project node. To add a child to the navigation item you want, right-click on the "Project" node and select "Add ..." | navigation item from the context menu invoked.

    Tutorial_UIC_Lesson12_1

  • For the newly added node, select "Note_ListView" in the View dropdown list. The Caption property will automatically be set to "Note". Optionally, you can set a user-friendly Id value.

  • For newly added node, select "Note_ListView" in the "View" drop-down list. "Title" attribute is automatically set to "pay attention." Alternatively, you can set up a user-friendly Id value.

    Tutorial_EF_Lesson4_4

    As you have seen, there are many ready-to-use Views available in the View dropdown list. These views are automatically generated based on business classes loaded to the Application Model. One of these classes is Note. So, you only need to add a corresponding View to the navigation items collection.

 

正如您所看到的,在"视图"下拉列表中有许多现成的视图可用。这些视图根据加载到应用程序模型的业务类自动生成。这些类之一是"注意"。因此,您只需向导航项集合添加相应的视图。

Note 注意

You can set shortcuts for navigation items via the Shortcut property. In this instance, you will not have to use a mouse to switch between Views, even if the navigation control is hidden via the View | Panels | Navigation | Hidden menu item.

您可以通过快捷方式属性为导航项设置快捷方式。在这种情况下,您不必使用鼠标在视图之间切换,即使导航控件通过视图隐藏 |面板 |导航 |隐藏的菜单项。

 

  • Run the WinForms or ASP.NET application. You now have an additional navigation item that allows you to add and edit plain text notes. Also note that this item already has an image assigned.

  • 运行 WinForms 或ASP.NET应用程序。现在,您有一个允许您添加和编辑纯文本注释的其他导航项。另请注意,此项目已分配了图像。

    Tutorial_UIC_Lesson12_3

Note 注意

DEFINE A Business class you the when your file application in, you CAN Apply The DefaultClassOptionsAttribute or NavigationItemAttribute attribute The INSTEAD the Application of the using the Model. See The Inherit from the Business Class The Class Library (XPO) lesson.You The CAN See Changes Made in the this in The Lesson Editor for the Invoked at the model Model.DesignedDiffs.xafml File located block in at the Main Demo | MainDemo.Module . project

when defining the business classes in your application, you can apply the default option class attributes or navigation project properties, rather than using the application model. Please refer to the course of business inherited from class library (XPO).

Change the model editor you can model calls you made in this lesson. The main demonstration module project.

 

Guess you like

Origin www.cnblogs.com/foreachlife/p/Add-an-Item-to-the-Navigation-Control.html