1. 程式人生 > >【C#圖解】PictureBox.SizeMode 屬性(轉)

【C#圖解】PictureBox.SizeMode 屬性(轉)

img attach mage 圖解 auto deb ict cmm src

PictureBoxSizeMode.Normal:

默認情況下,在 Normal 模式中,Image 置於 PictureBox 的左上角,凡是因過大而不適合 PictureBox 的任何圖像部分都將被剪裁掉。

技術分享

PictureBoxSizeMode.StretchImage:

使用 StretchImage 值會使圖像拉伸或收縮,以便適合 PictureBox。

技術分享

PictureBoxSizeMode.AutoSize:

使用 AutoSize 值會使控件調整大小,以便總是適合圖像的大小。

技術分享

PictureBoxSizeMode.CenterImage:

使用 CenterImage 值會使圖像居於工作區的中心。

技術分享

PictureBoxSizeMode.Zoom:

使用 Zoom 的值可以使圖像被拉伸或收縮以適應 PictureBox;但是仍然保持原始縱橫比。

技術分享

【C#圖解】PictureBox.SizeMode 屬性(轉)