WPF:当我最大化窗口时,控件不会调整大小 [英] WPF: when I maximize my window, controls do not resize

查看:368
本文介绍了WPF:当我最大化窗口时,控件不会调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,当我运行程序并按下右上角的最大化按钮时,我的窗口会调整大小,但是我所有的控件在页面中的大小都保持不变...

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.

我尝试过onStateChange处理程序,但是它什么也没做。

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?

谢谢!

推荐答案

单击控件时,您是否看到每侧都有黑色实心点或黑色圆圈?单击这些,实心点是控件固定在哪一侧,如果将其固定到所有侧面,它将随着窗口调整大小而调整大小。

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.

这篇关于WPF:当我最大化窗口时,控件不会调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆