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 ...
随机推荐
- Bzoj3441 乌鸦喝水
Time Limit: 20 Sec Memory Limit: 128 MBSubmit: 258 Solved: 97 Description [题目背景] 一只乌鸦在自娱自乐,它在面 ...
- 正则表达式解析基本json
var str='{"state": "SUCCESS","original": "C:\Users\liuhao_a\Deskt ...
- Ring0层创建事件,Ring3层接收
在学习驱动过程中,一个很重要的内容就是Ring3层与Ring0层的通信,方法有很多种,互斥体,信号量,文件等等,用的比较普遍的,还是事件.所以在学习的过程中,做了一个简单的Demo,主要是体会一下方法 ...
- 解决cursor未关闭造成的死锁
参考:https://blog.csdn.net/zc474235918/article/details/72731363/ https://blog.csdn.net/zmx729618/artic ...
- webdriver函数
import sys; print('%s %s' % (sys.executable or sys.platform, sys.version)) PyDev console: starting. ...
- [Leetcode Week9]Minimum Path Sum
Minimum Path Sum 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/minimum-path-sum/description/ Descr ...
- 在Xcode6中搭建Python开发环境
http://jingyan.baidu.com/article/f71d60379c73001ab741d14e.html 对于使用Mac电脑,刚入门Python的同学,一定很好奇是不是可以使用Xc ...
- Makefile之大型工程项目子目录Makefile的一种通用写法【转】
转自:http://www.cnblogs.com/skyofbitbit/p/3680753.html 管理Linux环境下的C/C++大型项目,如果有一个智能的Build System会起到事半功 ...
- Javacore分析(转载)
本文转自(http://www.ibm.com/developerworks/cn/websphere/library/techarticles/1406_tuzy_javacore/1406_tuz ...
- 1.flask视图和URL
1.第一个flask程序 from flask import Flask ''' Flask这个类是项目的核心,以后很多操作都是基于这个类的对象 注册URL等等,都是基于这个类 ''' app = F ...