Prevent DataGrid Scrolling From Snapping To Rows

强颜欢笑 提交于 2019-12-03 15:15:42

It sound like you want to disable Virtualization. To do it, just set CanContentScroll to False for the ScrollViewer. However, if you have alot of data in your DataGrid it can become pretty slow if you turn of Virtualization since all DataGridRows will be generated at once instead of when they're actually visible to the user.

<DataGrid ...
          ScrollViewer.CanContentScroll="False">
Robin Grönlund

I bumped into this problem where the scrolling would stick to rows. Then I came across: https://stackoverflow.com/a/13384164/4791472

<Datagrid ..
            VirtualizingPanel.ScrollUnit="Pixel"

basically it sets the scrolling to snap to pixels instead of items. This will make for a smooth scrolling experience.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!