xxaxx

在更新Listview数据时会出现闪烁,主要原因是没有开启双缓冲属性,在C#中可以通过重载Listview的方式开启,代码如下:

using System.Windows.Forms;

public class DoubleBufferListView : ListView
{
    public DoubleBufferListView()
    {
        SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
        UpdateStyles();
    }
}

 

分类:

技术点:

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2021-09-14
  • 2021-08-22
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-28
  • 2021-11-27
  • 2021-08-19
  • 2021-12-21
  • 2022-12-23
  • 2021-09-20
相关资源
相似解决方案