---
id: "P:cAlgo.API.DefaultStyles.ButtonStyle"
kind: "property"
type: "T:cAlgo.API.DefaultStyles"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ButtonStyle/"
---

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

# DefaultStyles.ButtonStyle

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

## ButtonStyle

Gets the Button default style.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public static Style ButtonStyle {get;}
```

Python:

```python
DefaultStyles.ButtonStyle: Style
```

### Returns

`Style` — 

### Examples

C#:

```csharp
var style = new Style(DefaultStyles.ButtonStyle);
style.Set(ControlProperty.BackgroundColor, Color.DarkRed);
Chart.AddControl(new Button { Text = "Sell", Style = style });
```

Python:

```python
style = Style(DefaultStyles.ButtonStyle)
style.Set(ControlProperty.BackgroundColor, Color.DarkRed)
button = Button()
button.Text = "Sell"
button.Style = style
api.Chart.AddControl(button)
```

