ControlBase.ResetProperty
method · ControlBase · cAlgo.API
DesktopCLICloud
Sets the property to the default value and removes its privelege over the style.
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 void ResetProperty(ControlProperty property)
controlBase.ResetProperty(property: ControlProperty) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
property | ControlProperty | ControlProperty | Control Property |
Examples
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);
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)