Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a DataGrid full of notes, and it's possible that a note will be taller then the DataGrid's height. When this happens, if you try and scroll down to read the bottom half of the note, the DataGrid immediately skips to the next row.

This not only prevents users from viewing the full note, but also causes the scrolling to feel choppy because it appears to jump around.

Is there a way to tell WPF to scroll smoothly past a long note without disabling the default DataGrid virtualization?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

I believe you are looking for the VirtualizingPanel.ScrollUnit attached property which you can set on the DataGrid.

If you set its value to Pixel instead of the default Item, it should do what you want.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...