本文介绍了为什么有些控件既有的BackgroundImage和图像属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么像按钮
或图片框
同时具有的BackgroundImage 和
图片
属性?
Why some controls like
Button
or PictureBox
has both BackgroundImage
and Image
property?
为什么在情况下按钮的两个人是需要的?为什么在图片框和backgroundImage应该可以?
why in case of button both of them is needed?or why in picturebox backgroundimage should be available?
推荐答案
的BackgroundImage
是 Control继承
。
图片
在按钮的情况下
从继承 ButtonBase
。
在一般情况下,
的BackgroundImage
是:
In general, the
BackgroundImage
is:
这是重新$ P $的图像psents对照的背景中显示的图像。
而
图片
将是一个是在控制。
为什么需要两个?
因为你周围可有你想要的背景图像显示在他们的控制空间。
因为有时候你可能会使用透明胶片上的
图片
和希望的背景图像显示出来。
Because you may have margins around a control where you want the background image to show on them.
Because sometimes you may use transparencies on the
Image
and want the background image to show through.
这篇关于为什么有些控件既有的BackgroundImage和图像属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!