一次对齐控件 [英] Align Controls at a time

查看:67
本文介绍了一次对齐控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在wpf中一次对齐标签或文本框



我们选择多个控件并在winforms中对齐

为什么我们不能用wpf

,这里对齐工具栏总是被禁用...

how to align labels or textboxes at a time in wpf
.
As we select more than one controls and align in winforms
why we cant do in wpf
, here align tool bar is always disabled...

推荐答案

这个问题没有意义。在WPF中,一切都按定义对齐。如果您调整窗口大小,则不会破坏对齐,除非您以某种方式将其搞定。 (因为你没有显示任何代码示例,我不知道如何。)在这方面,WPF比Forms更稳定,其中很多人使用ad-hoc显式控制定位(一个很大的禁忌)。 />


要了解WPF布局,请阅读:

http://msdn.microsoft.com/en-us/library/ms745058%28v=vs.110%29.aspx [ ^ ],

http://msdn.microsoft.com/ en-us / library / ms754152%28v = vs.110%29.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/bb514628%28v=vs.90%29.aspx [<一个HREF =HTTP://msdn.micros oft.com/en-us/library/bb514628%28v=vs.90%29.aspx\"target =_ blanktitle =新窗口> ^ ],

< a href =http://www.wpftutorial.net/LayoutProperties.html> http://www.wpftutorial.net/LayoutProperties.html [ ^ ]。



祝你好运,

-SA
The question does not really make sense. In WPF, everything is aligned by definition. If you resize a window, alignment is not broken, unless you screw it up in some way. (As you did not show any code samples, I don't know how.) In this respect, WPF is more stable than Forms, where many people use ad-hoc explicit positioning of control (a big no-no).

For understanding WPF layout, please read:
http://msdn.microsoft.com/en-us/library/ms745058%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/ms754152%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/bb514628%28v=vs.90%29.aspx[^],
http://www.wpftutorial.net/LayoutProperties.html[^].

Good luck,
—SA


这篇关于一次对齐控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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