How to prevent flickering in ListView when updating a single ListViewItem's text?

前端 未结 10 2211
囚心锁ツ
囚心锁ツ 2020-11-27 04:56

All I want is to update an ListViewItem\'s text whithout seeing any flickering.

This is my code for updating (called several times):

listView.BeginUp         


        
10条回答
  •  旧巷少年郎
    2020-11-27 05:51

    I know this question is quite old, but because this is one of the first search results on Google I wanted to share my fix.

    The only way i could remove flickering 100% was to combine the answer from Oliver (extension class with double-buffering) and using the BeignUpdate() and EndUpdate() methods.

    Neither of those on their own could fix flickering for me. Granted, I use a very complex list, that I need to push into the list and also need to update it almost every sec.

提交回复
热议问题