Skip to content

Style.Get

method · Style · cAlgo.API

DesktopCLICloud

Gets the chart object style for the specified ControlProperty.

Overloads

Signature Description
Get(ControlProperty property) Gets the chart object style for the specified ControlProperty.
Get(ControlProperty property, ControlState state) Gets the chart control style for the specified ControlProperty and ControlState.

Get(ControlProperty property)

Gets the chart object style for the specified ControlProperty.

public object Get(ControlProperty property)
style.Get(property: ControlProperty) -> object

Parameters

Name C# type Python type Description
property ControlProperty ControlProperty The control property

Returns object — The style value for the passed control property

Examples

var style = new Style();
style.Set(ControlProperty.FontSize, 14);
var fontSize = style.Get(ControlProperty.FontSize);
Print("Font size: {0}", fontSize);
style = Style()
style.Set(ControlProperty.FontSize, 14)
fontSize = style.Get(ControlProperty.FontSize)
api.Print(f"Font size: {fontSize}")

Get(ControlProperty property, ControlState state)

Gets the chart control style for the specified ControlProperty and ControlState.

public object Get(ControlProperty property, ControlState state)
style.Get(property: ControlProperty, state: ControlState) -> object

Parameters

Name C# type Python type Description
property ControlProperty ControlProperty The control property
state ControlState ControlState Control state

Returns object — The style value for the passed control property

Examples

var style = new Style();
style.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.Hover);
var hoverColor = style.Get(ControlProperty.BackgroundColor, ControlState.Hover);
Print("Hover background: {0}", hoverColor);
style = Style()
style.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.Hover)
hoverColor = style.Get(ControlProperty.BackgroundColor, ControlState.Hover)
api.Print(f"Hover background: {hoverColor}")