Place an Action in a Different Location 设置按钮的显示位置
In this lesson, you will learn how to place an Action in the required place. For this purpose, the ClearTasksAction that was defined in the Add a Simple Action lesson will be used. It is located together with the SaveTo, ExecuteReport and Refresh Actions. This Actions group is called View Action Containers (the ActionBase.Category property is set to "View" when implementing the ClearTasksAction). The remaining Actions are distributed among other Action Containers. In this lesson, you will move the ClearTasksAction to the RecordEdit Action Container.
在本课中,您将学习如何将 Action 放在所需位置。为此,将使用在"添加简单按钮"一课中定义的"清除任务操作"。它与"保存到""执行报告和刷新操作"一起位于。此操作组称为"查看操作容器"(在实现清除任务操作时,ActionBase.类别属性设置为"查看"。)。其余操作分布在其他操作容器中。在本课中,您将清除任务操作移动到记录编辑操作容器。
Note 注意
Before proceeding, take a moment to review the following lessons.
在继续之前,请花点时间复习以下课程。
Add a Simple Action
添加简单操作
Add an Action that Displays a Pop-up Window
添加显示弹出窗口的操作
Tip 提示
You can also change an Action location in code by handling the ActionControlsSiteController.CustomizeContainerActions event.
您还可以通过处理操作控制站点控制器来更改代码中的操作位置。
- Since the ClearTasksAction is implemented in the common application module, you can specify its location directly in this module. To do this, invoke the Model Editor by double-clicking the Model.DesignedDiffs.xafml file from the MySolution.Module project.
- 由于 ClearTasksAction 是在通用应用程序模块中实现的,因此可以直接在此模块中指定其位置。为此,请通过双击"模型.设计Diffs.xafml"文件从 MySolution.模块项目中调用模型编辑器。
The XAF application interface is based on the Application Model. The Model Editor is a tool for browsing and editing the Application Model. This tool is integrated in Visual Studio and displayed as a window pane. Commands specific to the Model Editor are available in the XAF Model Editor toolbar.
XAF 应用程序接口基于应用程序模型。模型编辑器是一个用于浏览和编辑应用程序模型的工具。此工具集成在 Visual Studio 中,并显示为窗口窗格。特定于模型编辑器的命令在 XAF 模型编辑器工具栏中可用。
If the XAF Model Editor toolbar is hidden, you can make it visible by checking the XAF Model Editor item in the VIEW | Toolbars menu.
如果 XAF 模型编辑器工具栏处于隐藏状态,则可以通过选中 VIEW 中的 XAF 模型编辑器项使其可见 |工具栏菜单。
Note 注意
To learn more about Model Editor capabilities, refer to the Model Editor topic.
要了解有关模型编辑器功能的详细信息,请参阅模型编辑器主题。
In the Model Editor, navigate to the ActionDesign | ActionToContainerMapping node. Its child nodes represent the Action Containers to which the Actions are mapped according to their Category property values. Expand the View node representing the View Action Container. Drag the ClearTasksAction child node to the RecordEdit node.
- 在模型编辑器中,导航到操作设计 |操作到容器映射节点。其子节点表示操作容器,根据其类别属性值映射操作。展开表示视图操作容器的视图节点。将"清除任务操作"子节点拖动到"记录编辑"节点。
Note 注意
Alternatively, you can use the context menu's Copy, Paste, Delete and Clone commands to modify the Application Model structure. The modified parts of the Application Model are displayed with a bold font. You can revert any node with all of its child nodes to their original state via the context menu's Reset Differences command.
或者,您可以使用上下文菜单的"复制"、"粘贴"、"删除和克隆"命令来修改应用程序模型结构。应用程序模型的修改部分以粗体显示。您可以通过上下文菜单的"重置差异"命令将其所有子节点的任何节点还原到其原始状态。
Run the WinForms or ASP.NET application. Invoke a detail form, since the ClearTasksAction is activated for Detail Views only. The following image demonstrates that this Action is located with Actions that belong to the RecordEdit Action Container.
- 运行 WinForms 或ASP.NET应用程序。调用详细信息窗体,因为仅为"详细信息视图"激活了"清除任务操作"。下图演示了此操作与属于"记录编辑操作容器"的操作一起定位。
You can see the changes made in the lesson in the Model Editor invoked for the Model.DesignedDiffs.xafml file located in the Main Demo | MainDemo.Module project. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/
您可以在为模型调用的模型编辑器中看到该课程所做的更改。主演示模块项目。主演示应用程序安装在%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/
.
Place an Action in a Different Location 设置按钮的显示位置的更多相关文章
- Winform中设置Dialog的显示位置居中
场景 点击按钮使窗体以Dialog的方式显示,即弹窗. //声明窗体对象 ChartOption chartOption = new ChartOption(); //显示Dialog chartOp ...
- QTbutton设置背景颜色和文字显示位置设置
QPushButton * pQBtn = new QPushButton( cBuff, this ); pQBtn->setStyleSheet("text-align: left ...
- Android中通过反射来设置Toast的显示时间
这个Toast的显示在Android中的用途还是非常大的,同一时候我们也知道toast显示的时间是不可控的.我们仅仅能改动他的显示样式和显示的位置,尽管他提供了一个显示时间的设置方法.可是那是没有效果 ...
- struts2 笔记01 登录、常用配置参数、Action访问Servlet API 和设置Action中对象的值、命名空间和乱码处理、Action中包含多个方法如何调用
Struts2登录 1. 需要注意:Struts2需要运行在JRE1.5及以上版本 2. 在web.xml配置文件中,配置StrutsPrepareAndExecuteFilter或FilterDis ...
- LoadRunner中Action的迭代次数的设置和运行场景中设置
LoadRunner中Action的迭代次数的设置和运行场景中设置 LoadRunner是怎么重复迭代和怎么增加并发运行的呢? 另外,在参数化时,对于一次压力测试中均只能用一次的资源应该怎么参数化呢? ...
- 笔记01 登录、常用配置参数、Action访问Servlet API 和设置Action中对象的值、命名空间和乱码处理、Action中包含多个方法如何调用
Struts2登录 1. 需要注意:Struts2需要运行在JRE1.5及以上版本 2. 在web.xml配置文件中,配置StrutsPrepareAndExecuteFilter或FilterDis ...
- matplotlib之设置极坐标起点的位置
#!/usr/bin/env python3 #-*- coding:utf-8 -*- ############################ #File Name: polar.py #Auth ...
- MFC 使用位图按钮,并且设置按钮的鼠标悬停效果
系统环境:Windows 10软件环境:Visual C++ 2013 SP1本次目的:使用位图按钮,并且设置按钮的鼠标悬停效果 在用MFC开发时,界面是比较不好开发的一块.VC中自带了CBitmap ...
- DataGridView设置不自动显示数据库中未绑定的列
项目中将从数据库查出来的数据绑定到DataGridView,但是不想显示所有的字段.此功能可以通过sql语句控制查出来的字段数目,但是DataGridView有属性可以控制不显示未绑定的数据,从UI层 ...
随机推荐
- Redis两种持久化策略分析
Redis专题地址:https://www.cnblogs.com/hello-shf/category/1615909.html SpringBoot读源码系列:https://www.cnblog ...
- python网络编程socketserver模块(实现TCP客户端/服务器)
摘录python核心编程 socketserver(python3.x版本重新命名)是标准库中的网络编程的高级模块.通过将创建网络客户端和服务器所必须的代码封装起来,简化了模板,为你提供了各种各样的类 ...
- (办公)记事本_Linux常用的文件操作命令
参考尚硅谷的谷粒学院的linux教程:http://www.gulixueyuan.com/course/300/task/7080/show 好吧,其实一个命令他要是讲超过20分钟,我就去看菜鸟教程 ...
- require与import
require 和 import,都是为了JS模块化使用.最近项目中,因为多人协同开发,出现了一个项目中同时使用了require 和 import 引入依赖的情况.正常情况下,一个项目中最好是对引入方 ...
- 破解另一家网站的反爬机制 & HMAC 算法
零.写在前面 本文涉及的反爬技术,仅供个人技术学习,禁止并做到: 干扰被访问网站的正常运行 抓取受到法律保护的特定类型的数据或信息 搜集到的数据禁止传播.交给第三方使用.或者牟利 如有可能,在爬到数据 ...
- 【戾气满满】Ubuntu 18.04使用QT通过FreeTDS+unixODBC连接MSSQL填坑记(含泪亲测可用)
前言 照例废话几句,想玩下QT,但是学习吧总得想点事情做啊,单纯学习语法用法这些?反正我是学不下去的,脑袋一拍,就先学下怎么连接数据库吧!然而万万没想到,我这是给自己挖了一个深深的坑啊! 学习自然去官 ...
- 使用kubernetes的cronjob定时备份mysql数据库
1.创建cronjob的文件 CronJob所描述的,正是定时任务. 在给定时间点只运行一次 在给定时间点周期性地运行 一个 CronJob 对象类似于 crontab (cron table)文件中 ...
- How to: Use the Entity Framework Code First in XAF 如何:在 XAF 中使用EF CodeFirst
This topic demonstrates how to create a simple XAF application with a business model in a DbContext ...
- jQuery总结02_jq的dom操作+属性操作
一:JQuery知识点 *:JQuery的dom操作 *:获取节点.给节点添加内容 *:动态创建dom节点 比如动态创建表格等,在js里面进行完成. *删除节点 这里面的删除就是将其放在了一个地方,并 ...
- Cesium数据可视化-仓储调度系统可视化部分(附github源码)
Cesium数据可视化-仓储调度系统可视化部分 目的 仓储调度系统需要一个可视化展示物资运输实况的界面,需要配合GPS设备发送的位置信息,实时绘制物资运输情况和仓储仓库.因此,使用Cesium可视化该 ...