Skip to content

ControlBase.Margin

property · ControlBase · cAlgo.API

DesktopCLICloud

Gets or sets the level of thickness of the margin of the chart control instance. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".

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 Thickness Margin {get; set;}
controlBase.Margin: Thickness

Returns Thickness

Examples

var panel = new StackPanel();
panel.AddChild(new Button { Text = "Buy", Margin = new Thickness(5, 5, 5, 0) });
panel.AddChild(new Button { Text = "Sell", Margin = 5 });
Chart.AddControl(panel);
panel = StackPanel()
buyButton = Button()
buyButton.Text = "Buy"
buyButton.Margin = Thickness(5, 5, 5, 0)
sellButton = Button()
sellButton.Text = "Sell"
sellButton.Margin = Thickness(5)
panel.AddChild(buyButton)
panel.AddChild(sellButton)
api.Chart.AddControl(panel)