What is the difference between BackgroundImage and button image?

I have a simple question, if I have a button named myButton in Windows Forms, what is the difference between myButton.Image and myButton.BackgroundImage? Thank you in advance!

+5
source share
3 answers

BackgroundImageIt looks like a wallpaper, it covers the whole background .. you must use patterns or full images for the background. If you are just trying to show the icon, useButton.Image

For a property Button.Imagefrom MS documentation:

Image displayed on the control button.

BackgroundImage

An image representing the image to display against the background of the control.

So you can install BackgoundImage, and Button.Image Button.Imagewill also be placed on topBackgroundImage

. Windows Forms . , RightToLeftLayout .

, Button BackgroundImage Button.Image. , , .

BackGroundImage with Button.image

, Button.Image ImageAlign

ImageAlign

RTL, , . , , .

enter image description here

+6

- , , , .

. ( ) . (. )

enter image description here

+2

myButton.Image => The image displayed on the control button. myButton.BackgroundImage => The image displayed on the background of the control.

0
source

All Articles