Add an Item to the Navigation Control 将项目添加到导航控件
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 将项目添加到导航控件的更多相关文章
- Access Grid Control Properties 访问网格控件属性
In this lesson, you will learn how to access the properties of a list form's Grid Control in WinForm ...
- VS2010/MFC编程入门之二十八(常用控件:列表视图控件List Control 上)
前面一节中,鸡啄米讲了图片控件Picture Control,本节为大家详解列表视图控件List Control的使用. 列表视图控件简介 列表视图控件List Control同样比较常见, ...
- Visual studio C++ MFC之树形控件Tree Control
背景 本篇旨在MSDN帮助文档下总结树形控件Tree Control的使用,并列出碰到的具体问题. 正文 树形控件Tree Control的类则是CTreeCtrl,具体成员对象详见链接,以下则描述一 ...
- VS2010/MFC常用控件:图片控件Picture Control
图片控件Picture Control 本节主要讲一种简单实用的控件,图片控件Picture Control.我们可以在界面某个位置放入图片控件,显示图片以美化界面. 图片控件简介 图片控件和前面讲到 ...
- 【转载】foreach+Control.Controls无法一次性移除所有子控件解决方法
博客转载地址:http://www.mzwu.com/article.asp?id=2254 //在panel1中添加20个Button ; ; ; i <= ; i++) { ) row++; ...
- VS2010/MFC编程入门之二十七(常用控件:图片控件Picture Control)
上一节中鸡啄米讲的是滚动条控件,本节主要讲一种简单实用的控件,图片控件Picture Control.我们可以在界面某个位置放入图片控件,显示图片以美化界面. 图片控件简介 图片控件和前面讲到的静态文 ...
- VS2010-MFC(常用控件:图片控件Picture Control)
转自:http://www.jizhuomi.com/software/193.html 本节主要讲一种简单实用的控件,图片控件Picture Control.我们可以在界面某个位置放入图片控件,显示 ...
- C# WinForm调用UnityWebPlayer Control控件 <学习笔记1>
工具 1.三维场景 Unity 5.0.2f1 2.开发环境Microsoft Visual Studio 2010 3.需要使用的控件 UnityWebPlayer Control 出现的问题及解决 ...
- 背水一战 Windows 10 (76) - 控件(控件基类): Control - 基础知识, 焦点相关, 运行时获取 ControlTemplate 和 DataTemplate 中的元素
[源码下载] 背水一战 Windows 10 (76) - 控件(控件基类): Control - 基础知识, 焦点相关, 运行时获取 ControlTemplate 和 DataTemplate 中 ...
随机推荐
- 视频剪辑什么鬼?Python 带你高效创作短视频
阅读文本大概需要 10 分钟. 近两年,抖音.快手将短视频推到风口浪尖上,要生产出高质量的视频,离不开视频剪辑这一环节:在全民剪片浪潮中,大众使用最多的剪辑软件如:Pr.FCPX.剪印.Vue 等. ...
- cmake常用命令总结
最近研究了下cmake,总结了一些常用命令,方便以后快速查找. project(projectname [CXX] [C] [Java]): 设置工程名. set(VAR [VALUE] [CACHE ...
- Redis基础知识、命令以及java操作Redis
1 nosql的概念 sql:操作(关系型)数据库的标准查询语言 关系型数据库(rdbms):以关系(由行和列组成的二维表)模型为核心数据库,有表的储存系统.(mysql.oracle.sqlserv ...
- HA Joker Vulnhub Walkthrough
下载地址: https://www.vulnhub.com/entry/ha-joker,379/ 主机扫描: ╰─ nmap -p- -sV -oA scan 10.10.202.132Starti ...
- Could not find any version that matches com.android.support:appcompat-v7:29.+
新学Android开发设计用到Android Studio,说实话真的是BUG满天飞,稍有不慎就会蹦出一个不明所以的问题. 新建Android工程时编译运行报错: 目测是本地文件和工程对应的依赖包不匹 ...
- SQL SERVER查询数据库所有表的大小,按照记录数降序排列
SELECT B.NAME,A.ROW_COUNT FROM SYS.DM_DB_PARTITION_STATS A,SYS.OBJECTS BWHERE A.OBJECT_ID=B.OBJECT_I ...
- leetcode菜鸡斗智斗勇系列(2)--- 把一个ipv4地址转换成一串数字
1.原题: https://leetcode.com/problems/defanging-an-ip-address/ 这道题本身很简单, Given a valid (IPv4) IP addre ...
- Mysql 主从复制搭建-极简版
前言 自己在百度.Google一番踩坑搭建成功后,记录一下,也希望后来人不再被这些坑到. 这里为了方便使用 docker,不会的同学请移步相关 Docker 教程. 正文 1. 启动 mysql #启 ...
- XGBoost缺失值引发的问题及其深度分析
1. 背景 XGBoost模型作为机器学习中的一大“杀器”,被广泛应用于数据科学竞赛和工业领域,XGBoost官方也提供了可运行于各种平台和环境的对应代码,如适用于Spark分布式训练的XGBoost ...
- 转pytorch中训练深度神经网络模型的关键知识点
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/weixin_42279044/articl ...