2011-12-28 10 views
1

パネルに画像を配置したいが、パネルのサイズに合わせて繰り返す必要はない。パネルは、実際の画像よりもはるかに広いですので、パネルの背景画像の繰り返しC#

panel3.BackgroundImage = picture1; 

しかし、Picture1のは、数回繰り返される:私がやったこと

はこれです。

私が望むのは、元の形式でのみ画像を表示することです。私はそれが繰り返されることを望んでいない。

どうすればいいですか?おかげ

答えて

3

はrepeatitionを停止します

panel3.BackgroundImageLayout = ImageLayout.Stretch; 

この

を試してみて、パネル全体に画像を伸ばします。画像を伸ばさないようにする場合は、

1

BackgroundImageLayoutCenterと設定できます。

3
ImageLayout.Stretch; //make Image Fill the Control 
ImageLayout.None; //just put the image without any changes on size 
ImageLayout.Center; //adjust location of image to be centered 
ImageLayout.Tile; //repeat image 
ImageLayout.Zoom; //re size image to be all viewed in the control (without stretch) 
関連する問題