Skip to content

ToggleButton.Content

property · ToggleButton · cAlgo.API

DesktopCLICloud

Gets or sets the content.

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 ControlBase Content {get; set;}
toggleButton.Content: ControlBase

Returns ControlBase

Examples

var content = new StackPanel { Orientation = Orientation.Horizontal };
content.AddChild(new Rectangle { Width = 8, Height = 8, FillColor = Color.Orange, Margin = 3 });
content.AddChild(new TextBlock { Text = "Alerts" });
var toggleButton = new ToggleButton { Content = content };
Chart.AddControl(toggleButton);
content = StackPanel()
content.Orientation = Orientation.Horizontal
label = TextBlock()
label.Text = "Alerts"
content.AddChild(label)
toggleButton = ToggleButton()
toggleButton.Content = content
api.Chart.AddControl(toggleButton)