WPF:当我最大化窗口时,控件不会调整大小

编程入门 行业动态 更新时间:2024-10-09 21:22:47
本文介绍了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:当我最大化窗口时,控件不会调整大小

本文发布于:2023-07-09 21:04:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1088204.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:当我   控件   大小   窗口   WPF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!