为什么有些控件既有的BackgroundImage和图像属性? [英] Why some controls has both BackgroundImage and Image property?

查看:208
本文介绍了为什么有些控件既有的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对照的背景中显示的图像。

An Image that represents the image to display in the background of the control.

图片将是一个是控制。

为什么需要两个?

  • 因为你周围可有你想要的背景图像显示在他们的控制空间。
  • 因为有时候你可能会使用透明胶片上的图片和希望的背景图像显示出来。
  • 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和图像属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆