Hi,
my problem is that I have a smal dialog whith some UltraLabel in a TabelLayoutPanel.
I want to set the UltraLabel to AutoSize = true but this resolves in a bad performance.
I added a Demo Version.
I this you have 3 Versions of my Dialog
1 whith UltraLabel.AutoSize = true and DockStyle= Fill
1 whith UltraLabel.AutoSize = false and DockStyle= Fill
1 whith UltraLabel.AutoSize = true and DockStyle= None
all the other things are the same (I only copyed the Dialog)
On the start Form you can open all this Dialogs and the Dialog (AutoSize = true and DockStyle= Fill) from a member so you see the constructor dose not cost much time.
If you try it you can see UltraLabel.AutoSize = false and DockStyle= Fill is much more performant than the other.
Any idea why this is so or a way to get AutoSize whithout losing performace?
Thanks
Wolfgang
Hi Wolfgang,
After the call to InitializeComponent in the form's constructor should work. You might want to try it in Form_Load just to be sure, but it sounds like the issue you are experiencing is different than the other one for which I posted that workaround.
I ran the sample you attached here, but I am not sure what I am supposed to do with it in order to see the problem. What kind of performance problem are you having? I clicked all four buttons on the form and they all appear almost instantaneously for me.
Hi Mike,
i have tested it and it brings me no performance. I added in the constructor after the InitializeComponent() Method call the CreateControl Method on all Label this brings no performance.
Or must I remove the Label from the desigenerfile and add them on runtime (this woud take away the power of the designer).
There's a very similar issue reported here: UltraLabel performance - Infragistics Community
It's not exactly the same situation you are in, but I beleive it's probably the same basic underlying issue and the workaround I posted there may help you, as well.
Hello,
I know what the meaning of the properties is.
My Problem is the bad performance if i set UltraLabel.AutoSize=true.
I want AutoSize cause the text showd fit in the control and DockStyle = Fill cause all the Labels in the same column showd be at the same size (for example so realise a better OnClick). The Colum is also AutoSize
If you have al look on my Example you can see that if I set AutoSize on true the Dialog need noticeable more time to be shown. No reason if DockStyle ist set or not.
Hello Wolfgang,
AutoSize means that control is automatically resized to display the entire content. DockStyle = Fill mean that control borders are docked to its parent control and determines how a control is resized within the parent. When you set AutoSize = true and DockSile = Fill, then control first calculate how should be the sized based of its content, resize itself , then control get resized again to fit its parent container, because of the DockStyle property.
Let me know if you have any further questions.