I have a problem with performance of my code under Windows Forms.
Have a form, her layout is depending on constructor data, because he layout must be OnLoad
or in Constructor
generated.
I generation is simple, base FlowLayoutPanel
have other FlowLayoutPanels
, for each have a Label
and TextBox
with DataBinding
.
Problem is this is VERY SLOW, up to 20 seconds, i drawing less than 100 controls, from Performace Session
i know a problem is on 70% procesing functions:
- System.Windows.Forms.Control.ControlCollection.Add(class System.Windows.Forms.Control)
- System.Windows.Forms.ControlBindingsCollection.Add(class System.Windows.Forms.Binding)
How i can do with this? Anyone help me in this problem? How solve the dynamic form layout problem?