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时,顶部不要隐藏 布局: 注 ...
随机推荐
- android开发——学习总结20131204
android:launchMode,即Activity的启动模式,与Intent中的Flags共同作用,决定Activity如何启动. android:launchMode分别有"stan ...
- JS,JQuery的扩展方法
转 http://blog.csdn.net/tuwen/article/details/11464693 //JS的扩展方法: 1 定义类静态方法扩展 2 定义类对象方法扩展 ...
- add number
// io.cpp #include <iostream> int readNumber() { std::cout << "Enter a number: &quo ...
- 在simplescalar中添加基于PISA架构的指令
用sim-safe工具进行模拟.最近看代码的一点点心得记录一下. sim-safe工具:不检查所有指令错误,检查内存对齐和所有内存操作的内存访问权限 程序从main.c的main()函数中进入 int ...
- Android之HttpURLConnection
1.HttpURLConnection连接URL1)创建一个URL对象 URL url = new URL(); 2)利用HttpURLConnection对象从网络中获取网页数据 HttpURLCo ...
- Unity3D中制作Loading场景进度条
背景 通常游戏的主场景包含的资源较多,这会导致加载场景的时间较长.为了避免这个问题,可以首先加载Loading场景,然后再通过Loading场景来加载主场景.由于Loading场景包含的资源较少,所以 ...
- android百度地图相关
1.如果有报错Multiple dex files define Lcom/baidu/android/bbalbs/common/a/a一般是有重复jar包. 2.百度地图开发调试的应用程序正 ...
- MYSQL常用内置函数详解说明
函数中可以将字段名当作变量来用,变量的值就是该列对应的所有值:在整理98在线字典数据时(http://zidian.98zw.com/),有这要一个需求,想从多音字duoyinzi字段值提取第一个拼音 ...
- JavaScript数组删除重复元素(去重)的方法
1. var arr=str.split(""); ;arr.length->i;i++){ ;j<arr.length;j++){ if(arr[j]==arr[i] ...
- 发布以NLog作为日记工具的ASP.NET站点到IIS注意事项
一.可以通过在Web.Config文件中添加节点来配置,或是直接将NLog.config放在Web.config所在目录 二.通过节点的fileName属性指定日志文件规则时,可以使用${basedi ...