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

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

# ControlBase.ResetProperty

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

## ResetProperty(ControlProperty property)

Sets the property to the default value and removes its privelege over the style.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public void ResetProperty(ControlProperty property)
```

Python:

```python
controlBase.ResetProperty(property: ControlProperty) -> None
```

### Parameters

- `property` (`ControlProperty`, Python `ControlProperty`): Control Property

### Examples

C#:

```csharp
var style = new Style();
style.Set(ControlProperty.ForegroundColor, Color.Gray);
var textBlock = new TextBlock { Text = "Spread", Style = style, ForegroundColor = Color.Red };
textBlock.ResetProperty(ControlProperty.ForegroundColor);
Chart.AddControl(textBlock);
```

Python:

```python
style = Style()
style.Set(ControlProperty.ForegroundColor, Color.Gray)
textBlock = TextBlock()
textBlock.Text = "Spread"
textBlock.Style = style
textBlock.ForegroundColor = Color.Red
textBlock.ResetProperty(ControlProperty.ForegroundColor)
api.Chart.AddControl(textBlock)
```

