Skip to content

ControlBase.Opacity

property · ControlBase · cAlgo.API

DesktopCLICloud

Gets or sets the level of opacity of the chart control instance. Can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0.

Environment behaviour

CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Definition

public double Opacity {get; set;}
controlBase.Opacity: float

Returns double

Examples

var border = new Border { BackgroundColor = Color.Gold, Width = 150, Height = 60, Opacity = 0.5 };
Chart.AddControl(border);
Print("Opacity: {0}", border.Opacity);
border = Border()
border.BackgroundColor = Color.Gold
border.Width = 150
border.Height = 60
border.Opacity = 0.5
api.Chart.AddControl(border)
api.Print(f"Opacity: {border.Opacity}")