---
id: "M:cAlgo.API.Style.Get(cAlgo.API.ControlProperty)"
kind: "method"
type: "T:cAlgo.API.Style"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Get/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Style.Get

Member of [Style](https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/index.md).

## Get(ControlProperty property)

Gets the chart object style for the specified ControlProperty.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public object Get(ControlProperty property)
```

Python:

```python
style.Get(property: ControlProperty) -> object
```

### Parameters

- `property` (`ControlProperty`, Python `ControlProperty`): The control property

### Returns

`object` — The style value for the passed control property

### Examples

C#:

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

Python:

```python
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.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public object Get(ControlProperty property, ControlState state)
```

Python:

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

### Parameters

- `property` (`ControlProperty`, Python `ControlProperty`): The control property
- `state` (`ControlState`, Python `ControlState`): Control state

### Returns

`object` — The style value for the passed control property

### Examples

C#:

```csharp
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);
```

Python:

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

