Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的表单中有一个ListView控件。当表单调整大小时,我希望它ListView与表单同时调整大小,因此它保持 12px 右边距。
ListView
我怎样才能做到这一点?
您想在控件上使用锚定。如果你将它锚定在左右,它会随着调整大小而增长和缩小:
使用 Anchor 属性在相关方向设置锚点,因此您的控件将与其容器一起调整大小