Auto-size controls in winform

I have winform and I have posted the list in this form. When I maximize winform, the size of the list box remains the same.

But I do not want this. I want to adjust the size automatically.

Is there a default property for this?

Thanks Nagu

+6
c # winforms autosize
source share
3 answers

Look for binding properties. You can adjust the anchor to automatically resize to fit.

Anchor has 4 sides. If you snap to all 4 sides, the control will keep the aspect ratio in accordance with the size of its parent form.

+26
source share

Use the .Anchor property.

+8
source share

You can set the Dock property for the list. if you use the list box in some kind of parent control like a separator bar

+1
source share

All Articles