05-09-2018 09:38 AM
Hi to all,
I'm trying to load 10,000 xycursors in a scattergraph. I would like to do this asynchronously so that it looks like the graph is filling up bit by bit, without freezing the app (windows desktop exe). Any advice? I code in vb.net but if you have code in c# that can help as well. Thanks in advance!
05-11-2018 12:55 PM
UI frameworks like Windows Forms and WPF generally require all updates to happen on the UI thread. In general, creating 10,000 UI components is not going to perform well in any UI framework.
I would suggest something along the lines of this answer for a WPF question: using the Windows Forms custom drawing API to render the cursors, instead of creating thousands of cursor objects. (Unfortunately, I am not familiar with the Windows Forms custom drawing API, beyond knowing that it exists — perhaps BeforeDrawPlotArea
or AfterDrawPlotArea
would be the best event to use?)
Hope that helps!