How to speed up .NET winforms rendering

前端 未结 5 1863
慢半拍i
慢半拍i 2021-01-12 01:28

I have a series of forms and navigate between them.

Each form has a set of controls for which I load properties from SQLite database and this is the long (about 1s)

5条回答
  •  Happy的楠姐
    2021-01-12 02:18

    There is a simple way to speed up perceived performance of many controls, especially data intensive ones like listviews, listboxes, combo boxes etc.

    Before you populate them call the BeginUpdate() method and when done call the EndUpdate(). This disables the redrawing of the control until you're done populating it with data.

提交回复
热议问题