Skip to content

Button.Content

property · Button · 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;}
button.Content: ControlBase

Returns ControlBase

Examples

var content = new StackPanel { Orientation = Orientation.Horizontal };
content.AddChild(new Ellipse { Width = 8, Height = 8, FillColor = Color.LimeGreen, Margin = 3 });
content.AddChild(new TextBlock { Text = "Buy" });
var button = new Button { Content = content };
Chart.AddControl(button);
content = StackPanel()
content.Orientation = Orientation.Horizontal
dot = Ellipse()
dot.Width = 8
dot.Height = 8
dot.FillColor = Color.LimeGreen
label = TextBlock()
label.Text = "Buy"
content.AddChild(dot)
content.AddChild(label)
button = Button()
button.Content = content
api.Chart.AddControl(button)