DataGrid Icon column - paint performance issue
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, I have a datagrid with 2 icon columns, I found when the screen needs to repaint, the 2 icon columns slow down the painting, it seems that loading icons is taking time, any idea about how to make loading of icons faster? Thanks
For starters, if you're creating a
Graphics
instance yourself (probably not, but anyway...), make sure you dispose of it when finished or memory consumption will increase (call_Graphics_.Dispose()
when finished). The same goes for theIcon
. If you don't, it will take longer and longer because your memory consumption increases. Eventually you may exhaust the working memory alloc'd to your process.Microsoft MVP, Visual C# My Articles