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.
正如您在这张图片中看到的那样,按钮上设置的图片在没有明显原因的情况下被底部剪裁。图像为 24x24px 大,AutoSize按钮的属性设置为True.
AutoSize
True
该按钮直接位于窗口上,因此不会有任何布局影响其大小。
控件内部有一个隐式边距<button>。如果您扩大按钮的高度,剪裁将消失。
<button>
将图像设置为按钮的“BackgroundImage”属性,然后将按钮的“BackgroundImageLayout”属性设置为“Stretch”。