When the WindowState is "Normal", I can locate the controls on the left side and the right side by 50% to 50%. I want to locate the controls on the left side and the right side by 50% to 50% on the "Maximized" mode. For this, I set the anchors of the left side controls Top, Left, Right and set the anchors of the right side controls Top and Right. On the result, left side controls are extending as seen in the GIF picture but the right side controls are not extending %50. What can I do for this without using the TableLayoutPanel?
Asked
Active
Viewed 57 times
0
-
1Why without using a `TableLayoutPanel`? It's specifically designed for such situations. Otherwise, you'd need to handle the sizing manually in the form's `SizeChanged` event. – 41686d6564 stands w. Palestine Aug 13 '18 at 21:55
-
At least group the controls inside panels so Anchor can still work. Now you're down to resizing the panels, still somewhat practical in an event handler for the Resize event. Those panels might next inspire you to move to UserControls. – Hans Passant Aug 13 '18 at 22:01
-
@AhmedAbdelhameed - Because on the design mode, while using TableLayoutPanel, Visual Studio is very busy. So I hate using TableLayoutPanel. – Aug 13 '18 at 22:04
-
1You probably haven't program smartphones or wpf. If you want to keep 50-50 anchors won't do. You need to express locations and widths of controls in relation of the form(if it is the parent). eg if a control is at 10% on the left of form it should remain at 10% when maximized. The same with widths – γηράσκω δ' αεί πολλά διδασκόμε Aug 14 '18 at 01:23