wpf datagrid performance
http://stackoverflow.com/questions/1704512/wpf-toolkit-datagrid-scrolling-performance-problems-why
http://www.codeproject.com/Articles/784529/Solutions-for-WPF-Performance-Issue
http://stackoverflow.com/questions/11379357/wpf-net-4-datagrid-column-performance
http://stackoverflow.com/questions/3022921/wpf-datagrid-performance-concerns
http://stackoverflow.com/questions/697701/wpf-datagrid-performance?noredirect=1
http://social.technet.microsoft.com/wiki/contents/articles/30012.aspx#Rows_x_Columns_Lots_Bad
http://www.c-sharpcorner.com/UploadFile/31514f/optimizing-performace-in-wpf841/
https://blogs.msdn.microsoft.com/jgoldb/2008/05/15/whats-new-for-performance-in-wpf-in-net-3-5-sp1/
http://stackoverflow.com/questions/13764579/improve-wpf-datagrid-performance
Yes, the WPF DataGrid has built in support for virtualization. By default theVirtualizingStackPanel .IsVirtualizing property is set to true, so by default the virtualization is used on the DataGrid, and you can specify the VirtualizingStackPanel.VirtualizationMode to either Standard or Recycling .
By default, a VirtualizingStackPanel creates an item container for each visible item and discards it when it is no longer needed (such as when the item is scrolled out of view). When an ItemsControl contains a many items, the process of creating and discarding item containers can negatively affect performance. When VirtualizationMode is set to Recycling, the VirtualizingStackPanel reuses item containers instead of creating a new one each time.
For example, you can use Recycling mode like this:
<my:DataGrid AutoGenerateColumns="True" ItemsSource="{Binding}" Margin="11,20,8,9" Name="dataGrid1"
VirtualizingStackPanel.VirtualizationMode="Recycling" />
DataGrid.EnableColumnVirtualization
如果启用列虚拟化,则为 true,否则为 false。 注册的默认值为 false。
https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=ZH-CN&k=k(System.Windows.Controls.DataGrid.EnableColumnVirtualization);k(VS.XamlEditor);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.0)&rd=true
DataGrid.EnableRowVirtualization
如果启用行虚拟化,则为 true,否则为 false。 注册的默认值为 true。
https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=ZH-CN&k=k(System.Windows.Controls.DataGrid.EnableRowVirtualization);k(VS.XamlEditor);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.0)&rd=true
这样设置会提高用户体验:
<DataGrid ItemsSource="{Binding UserData}"
EnableColumnVirtualization="True"
EnableRowVirtualization="True"
ScrollViewer.IsDeferredScrollingEnabled ="True"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
AutoGenerateColumns="False">
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/white-space: pre;/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
http://files.cnblogs.com/files/CodingArt/DataGrid_Performance.zip
https://fastwpfgrid.codeplex.com/
wpf datagrid performance的更多相关文章
- WPF DataGrid常用属性记录
WPF DataGrid常用属性记录 组件常用方法: BeginEdit:使DataGrid进入编辑状态. CancelEdit:取消DataGrid的编辑状态. CollapseRowGroup:闭 ...
- WPF DATAGRID - COMMITTING CHANGES CELL-BY-CELL
In my recent codeproject article on the DataGrid I described a number of techniques for handling the ...
- WPF DataGrid某列使用多绑定后该列排序失效,列上加入 SortMemberPath 设置即可.
WPF DataGrid某列使用多绑定后该列排序失效 2011-07-14 10:59hdongq | 浏览 1031 次 悬赏:20 在wpf的datagrid中某一列使用了多绑定,但是该列排序失 ...
- xceed wpf datagrid
<!--*********************************************************************************** Extended ...
- 获取wpf datagrid当前被编辑单元格的内容
原文 获取wpf datagrid当前被编辑单元格的内容 确认修改单元个的值, 使用到datagrid的两个事件 开始编辑事件 BeginningEdit="dataGrid_Beginni ...
- WPF DataGrid绑定一个组合列
WPF DataGrid绑定一个组合列 前台: <Page.Resources> <local:InfoConverter x:Key="converter& ...
- WPF DataGrid自定义样式
微软的WPF DataGrid中有很多的属性和样式,你可以调整,以寻找合适的(如果你是一名设计师).下面,找到我的小抄造型的网格.它不是100%全面,但它可以让你走得很远,有一些非常有用的技巧和陷阱. ...
- WPF DataGrid显格式
Guide to WPF DataGrid formatting using bindings Peter Huber SG, 25 Nov 2013 CPOL 4.83 (13 votes) ...
- WPF DataGrid Custommization using Style and Template
WPF DataGrid Custommization using Style and Template 代码下载:http://download.csdn.net/detail/wujicai/81 ...
随机推荐
- Windows下使用批处理实现启动关闭mysql_DOS/BAT
cls @echo off :设置窗口字体颜色 color 0a :设置窗口标题 TITLE MySQL管理程序 by ThinkVenus call :checkAdmin goto menu :菜 ...
- [bzoj1588][HNOI2002]营业额统计——splay
题目大意 你被要求编写一个数据结构,支援以下操作,操作在线. 插入一个元素 查询一个元素与之前插入元素的最小差值. 题解 一道模板题.我是写了一个pre和succ函数水过的.1A,比较高兴. 代码 # ...
- Educational Codeforces Round 40 A B C D E G
A. Diagonal Walking 题意 将一个序列中所有的\('RU'\)或者\('UR'\)替换成\('D'\),问最终得到的序列最短长度为多少. 思路 贪心 Code #include &l ...
- go开发
我开发中一直用这一段 //for debuggingfunc printPretty(v interface{}, mark string) (err error) { fmt.Printf(&quo ...
- Linux添加用户并赋予/取消管理员权限
Ubuntu sudo adduser username # 添加用户 sudo adduser username sudo # 追加管理员权限 grep -Po '^sudo.+:\K.*$' /e ...
- mysql约束与索引的区别
一:约束 作用:是为了保证数据的完整性而实现的一套机制,它具体的根据各个不同的数据库的实现而有不同的工具(约束): 这里主要讲解mysql的约束: 1.非空约束:not null; 指示某列不能存储 ...
- [ 手记 ] LNMP安装过程及优化
环境:CentOS release 6.4 x64 1.配置防火墙: 上一篇博客已经写过:http://www.cnblogs.com/hukey/p/5300832.html 2.修改sysctl. ...
- NetBeans中从实体创建Restful webservice工程
分布式系统和移动计算...... 这学期上的课,名字听起来是不是很霸气? 然而 其实就是 restful 和 安卓...... 汗....... 用的IDE还是netBeans, 第一次听说有这个ID ...
- 编译opencv有关cuda的代码
opencv3.2提供了cuda很好的支持,cuda的opencv接口,让用户想使用opencv那样去使用cuda,不用写cuda代码 一开始编译opencv有关cuda的代码,opencv 里sam ...
- Iphone安装Pinterest
由于Pinterest在中国的app store下架了,也就搜索不到该应用.所以只能上美国的app store下载. 1,下载itunes,登录vpn,注册新的apple id: 2,手机连接vpn, ...