The DataGridView control does not support double buffering. If DoubleBuffered is set to true in a derived DataGridView control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns.所在環境也是有自訂 DataGridView 並開啟 DoubleBuffered 來使用,一直以來沒有出現大問題,測試理解何謂 visual feedback 效果
自訂 DataGridView 並開啟 DoubleBuffered
using System.Windows.Forms;
namespace AvoidDoubleBuffer
{
public class UCDataGridView : DataGridView
{
public UCDataGridView()
{
DoubleBuffered = true;
}
}
}
沒有留言:
張貼留言