WPF: when I maximize my window, controls do not re

2019-08-05 19:27发布

问题:

So when I run my program, and hit the maximize button up in the right corner, my window resizes, but all my controls stay the same size in the page...

If I click a corner or edge of my window and drag to resize, the controls re-size as I would expect.

I have tried playing with the onStateChange handler, but it has not done anything.

Anyone have any ideas how to make controls resize when I maximize my window?

Thanks!

回答1:

When you click on a control, do you see that each side has either a black solid dot or a black circle? Click on those, and solid dots are what side the control is pinned to and if you pin it to all sides it will resize as the window resizes.