Spread Windows Forms 8.0 Product Documentation
BackgroundImage Property (ElementWindowless)
Example 


Gets or sets the background image for the element.
Syntax
'Declaration
 
Public Overridable Property BackgroundImage As Picture
'Usage
 
Dim instance As ElementWindowless
Dim value As Picture
 
instance.BackgroundImage = value
 
value = instance.BackgroundImage
public virtual Picture BackgroundImage {get; set;}

Property Value

Picture object containing the image
Remarks

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

Set this property to specify the background picture layer. This property is available at run time only.

Set the ForegroundImage property to specify the foreground picture layer. Set the Picture property to specify the picture in the content layer.

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

AlignHorz
Specifies horizontal alignment
AlignVert
Specifies vertical alignment
Image
Specifies the picture to display
Style
Specifies how to display the picture, such as stretched proportionally or tiled
TransparencyColor
Specifies what color in the picture to make transparent

If the application changes the background picture, the BackgroundImageChanged event occurs.

Example
control.BackgroundImage = new FarPoint.Win.Picture(Image.FromFile("d:\overlay.bmp"));
control.MarginTop = 3;
control.MarginBottom = 3;
control.BackgroundImage = New FarPoint.Win.Picture(Image.FromFile("d:\overlay.bmp"))
control.MarginTop = 3
control.MarginBottom = 3
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

Reference

ElementWindowless Class
ElementWindowless Members
BackgroundImageChanged Event
ForegroundImage Property
Picture Property
AlignHorz Property
AlignVert Property
Image Property
Style Property
TransparencyColor Property

 

 


Copyright © GrapeCity, inc. All rights reserved.