Why does the DoubleBuffered property default to false on a DataGridView and why is it protected?

后端 未结 4 419
失恋的感觉
失恋的感觉 2020-12-31 04:46

We had a performance issue with DataGridViews where the redraw was horridly slow and found the solution Here to create a derived type and enable double buffering on the cont

4条回答
  •  庸人自扰
    2020-12-31 05:14

    Double buffering by definition uses two buffers and twice the memory for rendering the view of the control into. So, there is some drawback there, however, with the amount of memory you get in a PC now, not many people probably would notice the sacrifice.

    No idea why its protected. Maybe the function wasn't available in an early version of the control, and when it was introduced the designers didn't want to change the public interface of the control. Or perhaps they considered it to be an advanced feature and wanted to limit the number of methods someone new to the control would have to grok to be able to make it do something useful.

提交回复
热议问题