Spread Windows Forms 12.0 Product Documentation
ForegroundImage Property (ElementControl)

FarPoint.Win Assembly > FarPoint.Win Namespace > ElementControl Class : ForegroundImage Property
Gets or sets the foreground image for the control.
Public Overridable Property ForegroundImage As Picture
Dim instance As ElementControl
Dim value As Picture
instance.ForegroundImage = value
value = instance.ForegroundImage
public virtual Picture ForegroundImage {get; set;}

Property Value

Picture object containing the image

Controls can display pictures in layers. The first layer consists of a foreground picture, next comes the content of the control, such as text and a picture, then comes the background picture, and finally, the background of the control, which displays the background color.

Set this property to specify the foreground picture layer.

This property is available at run time only.

Set the BackgroundImage property to specify the background picture layer. Set the Picture property to specify the picture in the content layer.

Set other features for the foreground picture using the following Picture class properties:

Specifies horizontal alignment
Specifies vertical alignment
Specifies the picture to display
Specifies how to display the picture, such as stretched proportionately or tiled
Specifies what color in the picture to make transparent

If the application changes the foreground picture, the ForegroundImageChanged event occurs.

See Also


ElementControl Class
ElementControl Members
ForegroundImageChanged Event
BackgroundImage Property
Picture Property
AlignHorz Property
AlignVert Property
Image Property
Style Property
TransparencyColor Property