ControlBase.Style
property · ControlBase · cAlgo.API
DesktopCLICloud
Gets or sets the style of a chart control.
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 Style Style {get; set;}
controlBase.Style: Style
Returns Style
Examples
var style = new Style();
style.Set(ControlProperty.BackgroundColor, Color.DarkGreen);
style.Set(ControlProperty.ForegroundColor, Color.White);
var button = new Button { Text = "Buy", Style = style };
Chart.AddControl(button);
style = Style()
style.Set(ControlProperty.BackgroundColor, Color.DarkGreen)
style.Set(ControlProperty.ForegroundColor, Color.White)
button = Button()
button.Text = "Buy"
button.Style = style
api.Chart.AddControl(button)