如何在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.