issue with wpf datagrid cell style when scrolling

后端 未结 1 1681
感情败类
感情败类 2020-12-31 19:32

I created a new DataGridCell style for my wpf datagrid (Red Border brush). When I scroll down vertically the selected cells disappear which is ok. When I scroll up I see the

相关标签:
1条回答
  • 2020-12-31 19:55

    Without any more details I can only guess that artifacts you're experiencing are a result of reusing of virtualized cells. You can test this by disabling column and row virtualization:

    <DataGrid EnableRowVirtualization="False" EnableColumnVirtualization="False" ...
    

    Also, if this doesn't help did you by any chance override the Equals method of your data items? ItemsControls occasionally glitch when they display several equal items.

    0 讨论(0)
提交回复
热议问题