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.

在本课中,您将学习如何将项添加到导航控件。为此,将使用商务舱库中的 Note 业务类。

Note 注意
Before proceeding, we recommend that you review the following lessons:
在继续之前,我们建议您查看以下课程:
  • Place an Action in a Different Location
  • Add a Class from the Business Class Library and Use the Scheduler Module (XPO/EF)
  • 将操作放置在其他位置
  • 从商务舱库中添加类并使用计划程序模块 (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 类在代码中未用作祖先,则需要将其添加到 UI 生成过程中。为此,请使用模块设计器。在"导出的类型"窗格中,聚焦引用的程序集 |开发快车.持久.BaseImpl.v19.2 |记下项目并按下空格键。有关详细信息,请参阅从商务舱库 (XPO) 中添加类课程。

  • XAF 应用程序的导航结构由应用程序模型中的导航项节点定义。要自定义导航,请通过双击"模型.设计Diffs.xafml"文件在 MySolution.模块项目中调用模型编辑器。在树视图中,导航到导航项 |项目 |默认值 |项目节点。要将子项添加到所需的导航项,请右键单击"项目"节点并选择"添加..."|从调用的上下文菜单导航项。

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

  • 对于新添加的节点,在"查看"下拉列表中选择"Note_ListView"。"标题"属性将自动设置为"注意"。或者,您可以设置用户友好的 Id 值。

    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应用程序。现在,您有一个允许您添加和编辑纯文本注释的其他导航项。另请注意,此项目已分配了图像。

Note 注意

When you define a business class in your application, you can apply the DefaultClassOptionsAttribute or NavigationItemAttribute attribute instead of using the Application Model. See the Inherit from the Business Class Library Class (XPO) lesson.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.

在应用程序中定义业务类时,可以应用默认类选项属性或导航项目属性属性,而不是使用应用程序模型。请参阅从业务类库类 (XPO) 课程继承。

您可以在本课中为模型调用的模型编辑器中所做的更改。主演示模块项目。

Add an Item to the Navigation Control 将项目添加到导航控件的更多相关文章

  1. Access Grid Control Properties 访问网格控件属性

    In this lesson, you will learn how to access the properties of a list form's Grid Control in WinForm ...

  2. VS2010/MFC编程入门之二十八(常用控件:列表视图控件List Control 上)

    前面一节中,鸡啄米讲了图片控件Picture Control,本节为大家详解列表视图控件List Control的使用.      列表视图控件简介 列表视图控件List Control同样比较常见, ...

  3. Visual studio C++ MFC之树形控件Tree Control

    背景 本篇旨在MSDN帮助文档下总结树形控件Tree Control的使用,并列出碰到的具体问题. 正文 树形控件Tree Control的类则是CTreeCtrl,具体成员对象详见链接,以下则描述一 ...

  4. VS2010/MFC常用控件:图片控件Picture Control

    图片控件Picture Control 本节主要讲一种简单实用的控件,图片控件Picture Control.我们可以在界面某个位置放入图片控件,显示图片以美化界面. 图片控件简介 图片控件和前面讲到 ...

  5. 【转载】foreach+Control.Controls无法一次性移除所有子控件解决方法

    博客转载地址:http://www.mzwu.com/article.asp?id=2254 //在panel1中添加20个Button ; ; ; i <= ; i++) { ) row++; ...

  6. VS2010/MFC编程入门之二十七(常用控件:图片控件Picture Control)

    上一节中鸡啄米讲的是滚动条控件,本节主要讲一种简单实用的控件,图片控件Picture Control.我们可以在界面某个位置放入图片控件,显示图片以美化界面. 图片控件简介 图片控件和前面讲到的静态文 ...

  7. VS2010-MFC(常用控件:图片控件Picture Control)

    转自:http://www.jizhuomi.com/software/193.html 本节主要讲一种简单实用的控件,图片控件Picture Control.我们可以在界面某个位置放入图片控件,显示 ...

  8. C# WinForm调用UnityWebPlayer Control控件 <学习笔记1>

    工具 1.三维场景 Unity 5.0.2f1 2.开发环境Microsoft Visual Studio 2010 3.需要使用的控件 UnityWebPlayer Control 出现的问题及解决 ...

  9. 背水一战 Windows 10 (76) - 控件(控件基类): Control - 基础知识, 焦点相关, 运行时获取 ControlTemplate 和 DataTemplate 中的元素

    [源码下载] 背水一战 Windows 10 (76) - 控件(控件基类): Control - 基础知识, 焦点相关, 运行时获取 ControlTemplate 和 DataTemplate 中 ...

随机推荐

  1. Nginx-HTTP Strict Transport Security(HSTS)

    HTTP Strict Transport Security(HSTS) HTTP Strict Transport Security(通常简称为HSTS)是一个安全功能,它告诉浏览器只能通过HTTP ...

  2. Python爬虫实战:爬取腾讯视频的评论

    前言 本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. 作者: 易某某 PS:如有需要Python学习资料的小伙伴可以加点击下方链 ...

  3. Aery的UE4 C++游戏开发之旅(3)蓝图

    目录 蓝图 蓝图命名规范 蓝图优化 暴露C++至蓝图 暴露C++类 暴露C++属性 暴露C++函数 暴露C++结构体/枚举 暴露C++接口 蓝图和C++的结合方案 使用继承重写蓝图 使用组合重写蓝图 ...

  4. OpenLDAP的docker版安装

    分为服务器和client的web版. ldap.sh #!/bin/bash -e docker run --name ldap-service -- docker run --name phplda ...

  5. 【数据库】SQLite3常用命令

    版权声明:本文为博主原创文章,转载请注明出处. https://www.cnblogs.com/YaoYing/ 打开SQLite3文件 sqlite3 student.db //打开student. ...

  6. Linux下执行脚本文件出现-bash: ./startup.sh: /bin/sh^M: 坏的解释器: 没有那个文件或目录

    原因:脚本文件是在Windows环境下编辑的,windows环境下,每一行的结尾是\n\r,而Linux环境下,每一行结尾是\n.使用cat  -A  filename 可以看到每行的结尾后面多出了一 ...

  7. 爬虫(四):requests模块

    1. requests模块 1.1 requests简介 requests 是一个功能强大.简单易用的 HTTP 请求库,比起之前用到的urllib模块,requests模块的api更加便捷.(本质就 ...

  8. JVM运行时数据区-详细结构图

  9. library: Vulnhub Walkthrough

    网络主机探测: 端口主机扫描: ╰─ nmap -p1-65535 -sV -A -O -sT 10.10.202.136 21/tcp open ftp vsftpd 3.0.380/tcp ope ...

  10. layui table 表格查询无效问题

    [热身话题] 在开发的过程中,大量数据的展示大多采用表格的方式,直观,清晰.在这里,我也使用过一些框架Bootstrap.table ,Dev table ,layui table.本次采用的layu ...