Visual Basic (Declaration) | |
---|---|
Public Overridable Property PictureTransparencyColor As Color |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As ElementWindowless Dim value As Color instance.PictureTransparencyColor = value value = instance.PictureTransparencyColor |
C# | |
---|---|
public virtual Color PictureTransparencyColor {get; set;} |
Property Value
Color object containing the picture transparency colorIn addition to displaying a picture in the content of the element, you can also display a foreground picture and a background picture. If you specify these pictures for an element, the element is painted as layers, with the foreground picture on top.
You can use the various pictures' transparency colors feature to display portions of the underlying content and other pictures in the element. Set this property to specify the transparency color for the picture layer.
When you set a transparency color, the background behind the picture shows through the pictures in the area that originally had the color you specify. For example, if you specify yellow as the transparency color, areas in the picture that are yellow appear transparent, and the area behind them shows through the picture.
Note: If the computer is in 256-color mode and the element displays a picture and a foreground picture that have different palettes, the palette for the foreground picture will override the palette for the picture. |
Specify the transparency color for the foreground and background pictures using the Picture class's TransparencyColor property.
Specify the picture for the picture layer by setting the Picture property.
You can also set the PictureMargin property to specify the margin to use between the picture and the text in the element.
Specify the orientation of the picture by setting the PictureOrientation property.
csharp | Copy Code |
---|---|
control.Picture = Image.FromFile("d:\overlay.bmp");
control.MarginTop = 3;
control.MarginBottom = 3;
control.PictureTransparencyColor = Color.Blue; |
Visual Basic | Copy Code |
---|---|
control.Picture = Image.FromFile("d:\overlay.bmp")
control.MarginTop = 3
control.MarginBottom = 3
control.PictureTransparencyColor = Color.Blue |
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8