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. WPF的DataGrid用法-小白向

    前几天打算尝试下DataGrid的用法,起初以为应该很简单,可后来被各种使用方法和功能实现所折磨.网络上的解决方法太多,但也太杂.没法子,我只好硬着头皮阅览各种文献资料,然后不断的去尝试,总算小有成果 ...

  2. Linux服务器部署.Net Core笔记:三、CentOS 7上安装.NetCore运行环境

    1.要开始安装 .NET,您需要注册 Microsoft 签名密钥并添加 Microsoft 产品提要.每台机器只需要做一次. 打开命令提示符并运行以下命令:sudo rpm -Uvh https:/ ...

  3. Android 插件化开发(二):加载外部Dex文件

    在学习Java反射的技术后,我们可以开始更深一步的探究插件化开发了.首先先讲一下Android App的打包流程,然后我们通过一个简单的例子 —— 实现插件化加载外部Dex来完成初级的插件化开发的探索 ...

  4. composer入门 一些简单常用的命令介绍

    composer是什么 composer是PHP的插件依赖管理工具,我个人感觉和java的Maven.Gradle很类似. Windows OS下安装composer 参考: https://www. ...

  5. C语言程序运行时的一些细节

    本章可以看作是 <Unix 环境高级编程>Ch7 的笔记. C 程序运行的开始和结束 一个可以运行的 C 语言总要有一个 main 函数,main 函数现在的完整定义是 int main( ...

  6. C语言笔记 06_作用域&数组

    作用域 任何一种编程中,作用域是程序中定义的变量所存在的区域,超过该区域变量就不能被访问.C 语言中有三个地方可以声明变量: 在函数或块内部的局部变量 在所有函数外部的全局变量 在形式参数的函数参数定 ...

  7. jumpserver 资产管理及授权

    1.用户管理-添加[用户列表] 1.1点击创建用户 1.2创建用户 2.用户管理-添加[用户组] 2.1点击创建用户组 2.2创建用户组   3.资产管理添加资产 3.1添加节点 3.2添加资产(点击 ...

  8. LinuxProbe小结

    1.修改主机名: /etc/hostname 2.配置 yum 软件仓库: (1)进入到 /etc/yum.repos.d/目录下,创建一个linuxprobe.repo的新文件(文件名称任意,结尾必 ...

  9. Java 读取excel表格文件

    注意,本文使用的Jar包为jxl.jar,只能处理97-03版本xls格式的Excel jar包 maven依赖: <dependency> <groupId>net.sour ...

  10. Jupiter 页面环境下使用pip无法安装(AttributeError: module 'pip' has no attribute 'main')

    异常: AttributeError Traceback (most recent call last) <ipython-input-5-880e5dfa627c> in <mod ...