Tuesday, October 07, 2008

winforms: Dock Fill is working wrong

I experienced much time with troubles in the C# windows form, if control is set dock:fill and I adding any other control (menu, status bar,whatever) to the form or panel.
In this case, main control with fill dock style doesn't recognize that need to fit, it overlapping any new control. Sometimes, to fix I creating new form and redesigned it from scratch.

Solution is very easy:
Right click on the control with fill dock style, and choose Bring to Front. Docking will be fixed :)

Source