XAF ListView 移除顶部工具栏
此方法适用于C/S及B/S,无需分别写在web和win中。
Module下新建ViewController,代码如下:
public partial class GongZuoJiaoShen_YinCangGongJuLan : ViewController<DetailView>
{
public GongZuoJiaoShen_YinCangGongJuLan()
{
InitializeComponent();
// Target required Views (via the TargetXXX properties) and create their Actions.
} protected override void OnActivated()
{
base.OnActivated();
// Perform various tasks depending on the target View.
//取消记录表的工具栏
foreach (ListPropertyEditor detailPropertyEditor in View.GetItems<ListPropertyEditor>())
{
if (detailPropertyEditor.Id == "JiaoShenJiLu")
detailPropertyEditor.ControlCreated += new EventHandler<EventArgs>(detailPropertyEditor_ControlCreated);
}
} /// <summary>
/// 取消记录表的工具栏
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void detailPropertyEditor_ControlCreated(object sender, EventArgs e)
{
Frame nestedFrame = ((ListPropertyEditor)sender).Frame;
if (nestedFrame != null && nestedFrame.Template is ISupportActionsToolbarVisibility)
{
((ISupportActionsToolbarVisibility)nestedFrame.Template).SetVisible(false);
}
} protected override void OnViewControlsCreated()
{
base.OnViewControlsCreated();
// Access and customize the target View control.
} protected override void OnDeactivated()
{
// Unsubscribe from previously subscribed events and release other references and resources.
base.OnDeactivated(); foreach (ListPropertyEditor detailPropertyEditor in View.GetItems<ListPropertyEditor>())
{
if (detailPropertyEditor.Id == "JiaoShenJiLu")
detailPropertyEditor.ControlCreated -= new EventHandler<EventArgs>(detailPropertyEditor_ControlCreated);
}
}
}
注意:VC的TargetType要设置,否则就是全局的了。
效果图:
XAF ListView 移除顶部工具栏的更多相关文章
- 自定义底部工具栏及顶部工具栏和Fragment配合使用demo
首先简单的介绍下fragment,fragment是android3.0新增的概念,其中文意思是碎片,它与activity非常相似,用来在一个activity中描述一些行为或一部分用户界面.使用锁个f ...
- Windows Phone 8.1开发:如何让ListView滚动到顶部,回到第一条?
Windows Phone 8.1开发中,ListView向下滑动了半天,用户如果突然想回头看看第一条数据怎么办? 如何让listView滚动到顶部,回到第一条? 很简单,一行代码.调用ListVie ...
- android listview滚动到顶部
1.为了实现类似IOS点击状态栏,列表回滚到顶部的功能(要平滑滚动效果),android上点击一个按钮或是图片什么的也可以让listview一次性滚动到顶部(滑动太多页时,一次可能滚不到顶部,使用ha ...
- [原] XAF ListView 凍結列
using System; using System.ComponentModel; using System.Collections.Generic; using System.Diagnostic ...
- [原] XAF ListView显示隐藏Footer菜单
using System; using DevExpress.ExpressApp; using DevExpress.ExpressApp.Win.Editors; using DevExpress ...
- ListView 滚回顶部
setSelection(0) listView.setSelectionAfterHeaderView(); list.smoothScrollToPosition(0);
- ListView滚动到顶部
videoAdapter.notifyDataSetChanged();videoListView.setSelection(0); 注意顺序先notify后setSelection
- 孙鑫C++教程留下来的作业--如何让工具栏在原来隐藏的位置出现
--加油,不仅仅是口号! BEGIN---------------------------------- 将工具栏进行停靠.当隐藏后再次点击出现的时候它出现在工具栏顶部了,并没有停靠在原来的位置,如何 ...
- 滑动listview隐藏和显示顶部布局
需求: 1.listview向下滑动时,隐藏顶部布局 2.listview向上滑动到最上面,显示顶部布局 3.顶部布局的隐藏和显示有过渡效果 4.第一次加载listview时,顶部不要隐藏 布局: 注 ...
随机推荐
- AndroidStudio导入项目一直卡在Building gradle project info最快速解决方案
AndroidStudio导入项目一直卡在Building gradle project info,实际上是因为你导入的这个项目使用的gradle与你已经拥有的gradle版本不一致,导致需要下载该项 ...
- 百度音乐API抓取
百度音乐API抓取 前段时间做了一个本地音乐的播放器 github地址,想实现在线播放的功能,于是到处寻找API,很遗憾,不是歌曲不全就是质量不高.在网上发现这么一个APIMRASONG博客,有“获取 ...
- jquery里面的名称冲突解决方法
jQuery 使用 $ 符号作为 jQuery 的简介方式. 某些其他 JavaScript 库中的函数(比如 Prototype)同样使用 $ 符号. jQuery 使用名为 noConflict( ...
- sql server 数据遍历插入表变量
)) DECLARE @str VARCHAR(MAX) ,) ,@start INT ,@end INT ,) SET @str = '1,2,3,4,5,6,7,8' SET @split = ' ...
- Yii;CodeIgniter;thinkphp学习
http://www.ibm.com/developerworks/cn/opensource/os-cn-yii/ http://codeigniter.org.cn/ http://baike.b ...
- Ubuntu:我不小心把/var/lock文件夹给删了
在一个风和日丽的下午,不正常关闭minicom导致了device 没有正常解锁,于是使用minicom的时候提示 device is locked: 根据网上看到的方法只要把/var/lock 里面的 ...
- 利用target的特性,可以实现纯css的tab效果切换
基础知识: :target起作用的是href连接到的位置 如 <a href="#tab1">tab1</a> <div id="tab1& ...
- 修改ubuntu中usr文件夹的权限后,sudo后出现sudo:must be setuid root问题的解决方案
无意之间,使用sudo chmod -R 777 /usr命令修改了usr文件的所有者,导致sudo:must be setuid root问题的出现,即sudo命令无法使用.网上介绍的方法差不多都相 ...
- 关于JS 事件冒泡和onclick,click,on()事件触发顺序
今天在给JQgrid中的标签添加click事件的时候,发现一个问题. JQgrid的table中,点击任何位置,都会勾选点击行的checkbox,而我希望在点击我的标签的时候,不要勾选checkbox ...
- 现在还需要测试或者QA人员吗?
Facebook没有专门的测试人员,都是开发自己测:微软裁掉了测试部门,改由开发测:google有少量的测试人员,主要做测试自动化框架开发或者性能.安全等专项测试,测试用例还是开发人员自己设计自己跑( ...