WPF:Datagrid查询速度优化

1.ScrollViewer.CanContentScroll

当设定 ScrollViewer.CanContentScroll="False"时,将禁用虚拟化
仅适用于:Item 数量比较少的情况。

"ScrollViewer currently allows two scrolling modes: smooth pixel-by-pixel scrolling (CanContentScroll = false) or discrete item-by-item scrolling (CanContentScroll = true). Currently WPF supports UI virtualization only when scrolling by item. Pixel-based scrolling is also called “physical scrolling” and item-based scrolling is also called “logical scrolling”."

wpf - 为什么将ScrollViewer.CanContentScroll设置为false会禁用虚拟化

ScrollViewer.VerticalScrollBarVisibility="Visible"

对比才发现 参数的顺序居然也有影响,上面的

添加新评论