thielj / MetroFramework

Metro UI of Windows 8 for .NET Windows Forms applications
http://thielj.github.io/MetroFramework
Other
396 stars 225 forks source link

Not Compatible with MdiContainer #93

Open MbaiMburu opened 7 years ago

MbaiMburu commented 7 years ago

Framework not working properly with mdicontainer form property. When child forms are maximized the control appear outside the main parent form. They also behave very abnormaly when minimized and maximized again

Clickity-Clack commented 5 years ago

I'm running into the same issue. From what I've gathered, when the child form first maximizes it maximizes to the size of the screen rather than the parent window. Once the parent window is resized, the child form will snap to the correct size, which is odd. If there are any controls anchored to the bottom or left of the child form and the child form is maximized on creation, the bottom left of those controls will have a significantly greater padding between the control and the bottom/left than the designer shows. It seems as though the controls are being initialized without adjusting for the much larger child form. The end result is that when the parent window is resized, any controls that were initialized when the child form was maximized are pushed way up to the upper right, often past the bounds of the window. Tl;dr - The issue breaks anchoring to the bottom and or left of a child form. The issue only occurs when the child form inherits from MetroForm. I also tried using the earlier version of MetroFramework (Modern UI), and the issue is present there, too. I created a test project without any controls on it, just the Windows.Forms.Form parent form, and a blank MetroFramework.Forms.MetroForm child form, and the issue still showed up, so the issue seems to be with MetroForm. I'm going to poke around in the source code for MetroFramework and see what I can turn up.