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 ...
随机推荐
- bzoj1036: [ZJOI2008]树的统计Count link-cut-tree版
题目传送门 这 算是link-cut-tree裸题啊 不过以前好像没有写过单点修改.............. #include<cstdio> #include<cstring&g ...
- Ajax的Result工具类
ResultUtil.java package cn.qlq.util; import java.io.Serializable; public class ResultUtil<T> i ...
- windows启动redis服务
参考:https://www.cnblogs.com/M-LittleBird/p/5902850.html 使用python的pip install redis以后还需要下载安装redis安装文件才 ...
- spring boot 注入 restTemplate
转载自:http://blog.csdn.net/liuchuanhong1/article/details/54631080 package com.chhliu.springboot.restfu ...
- 【 LVS 】DR 方式实现过程
LVS-DR方式实现负载均衡 一.环境介绍
- JSP 基础之 JSTL <c:if>用法
<c:if>还有另外两个属性var和scope.当我们执行<c:if>的时候,可以将这次判断后的结果存放到属性var里:scope则是设定var的属性范围.哪些情况才会用到va ...
- 《Java编程思想》笔记 第一章 对象导论
1.抽象过程 Q:什么是对象??? A: 1) 万物皆对象 --- 对象具有状态,行为和标识 2)程序是对象的集合,他们通过发送消息来告诉彼此要做的 3)通过创建包含现有对象的包的方式来创建新类型 ...
- PhpStorm最新版 2017激活办法
特别注意:为避免phpstorm联网时注册失效,请将“0.0.0.0 account.jetbrains.com”添加到hosts文件中. 最新版PhpStorm 2017正式版改进了PHP 7支持, ...
- HDU 1686 Oulipo【kmp求子串出现的次数】
The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e ...
- Android学习--广播机制
广播机制简介 Android的广播可以分为两种类型的,标准广播和有序的广播: 标准广播: 是一种完全异步执行的广播,在广播发出去之后,所有的广播接收器几乎是同一时接收到这条广播. 有序广播: 是一 ...