如何在WPF中自动调整按钮和其他控件的大小 [英] How to auto resize a button and other controls in WPF

查看:582
本文介绍了如何在WPF中自动调整按钮和其他控件的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个被边框隔开的窗口.我希望在窗口最大化时相应地放大边框左侧的按钮和其他控件.

我是图形编程的新手.如果您能用简单的词来解释一下wpf中的边框,网格,堆栈面板,页面和视口等术语,那将是很棒的.

任何帮助将非常感激.谢谢

I have a window separated by a Border. I want the buttons and other controls on the left side of the border to be enlarged accordingly when the window is maximized.

I am fairly new to graphics programming. It would be great if you could please explain me in simple words about what terms like border, grid, stack panel, page, and viewport mean in wpf.

Any help would be much appreciated. Thanks

推荐答案

您可以通过以下方式将控件的各边锚定到其父容器:a)设置边距,b)设置水平和垂直对齐方式.

您可以通过购买书籍和/或滥用Google来了解有关WPF/Silverlight的基础知识.
You can anchor sides of controls to their parent containers by a) setting margins, and b) setting the horizontal and vertical alignment.

You can learn the basics about WPF/Silverlight by purchasing a book, and/or abusing google.


这篇关于如何在WPF中自动调整按钮和其他控件的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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