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 ...
随机推荐
- CCCC练习即感
字符串进行初始化时不能通过char a[10]={'\0'}来简单进行,写循环或者memset,亲测有效,以及初始化分好情况,用空格还是'\0',别乱搞. 有一个有意思的题,连续因子,从2开始,依次向 ...
- [bzoj1251]序列终结者——splay
题目大意 网上有许多题,就是给定一个序列,要你支持几种操作:A.B.C.D.一看另一道题,又是一个序列 要支持几种操作:D.C.B.A.尤其是我们这里的某人,出模拟试题,居然还出了一道这样的,真是没技 ...
- Java任务调度框架----kunka
初衷 工作中用到了很多框架,但是给我印象最深的还是我们PO(Product Owner)在若干年前写的一套任务调度框架,在JDK1.4之前,concurrent包还没有引入, 手写的这套Token调度 ...
- 逐步实现python版wc命令
Python 如何处理管道输入输出 sys.stdin 等于打开了一个文件对象,所有输入的文件都会写入到标准输入文件中(键盘) sys.stdout 等于打来了一个文件对象,使用.write()把信息 ...
- Pycharm2017汉化包下载链接
https://github.com/ewen0930/PyCharm-Chinese/tree/f5a8dc4a8f34398e81a69c69bb046aa4eff27c90 1.首先下载PyCh ...
- camera驱动框架分析(中)
camera host的驱动 下面开始分析camera host吧,如果仅仅是想知道camera sensor驱动怎么写,而不想知道内部具体怎么个调用流程,怎么个架构设计,那可以跳过该部分,直接去看i ...
- mac air上archlinux的安装及优化
前言 最近总感觉跑了两年多ubuntu系统的MacBookAir6,2越来越不行了,内存总是亮红灯,软件效率也低了不少.最直接的解决方法当然是换电脑,购买一台配置更好的,比如2017款xps,不过在我 ...
- 最新Python异步编程详解
我们都知道对于I/O相关的程序来说,异步编程可以大幅度的提高系统的吞吐量,因为在某个I/O操作的读写过程中,系统可以先去处理其它的操作(通常是其它的I/O操作),那么Python中是如何实现异步编程的 ...
- Selenium2+python自动化28-table定位【转载】
前言 在web页面中经常会遇到table表格,特别是后台操作页面比较常见.本篇详细讲解table表格如何定位. 一.认识table 1.首先看下table长什么样,如下图,这种网状表格的都是table ...
- TCP,UDP,IP包头格式及说明(zz)
一.MAC帧头定义 /数据帧定义,头14个字节,尾4个字节/ typedef struct _MAC_FRAME_HEADER { ]; //目的mac地址 ]; //源mac地址 short m_c ...