Canvas constructor
constructor · Canvas · cAlgo.API
DesktopCLICloud
Initializes a new instance of the Canvas class.
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 Canvas()
Canvas()
Examples
var canvas = new Canvas { Width = 250, Height = 120, BackgroundColor = Color.FromArgb(60, Color.Black) };
canvas.AddChild(new TextBlock { Text = "Entry", Left = 10, Top = 10 });
canvas.AddChild(new TextBlock { Text = "Exit", Left = 10, Top = 40 });
Chart.AddControl(canvas);
canvas = Canvas()
canvas.Width = 250
canvas.Height = 120
canvas.BackgroundColor = Color.FromArgb(60, Color.Black)
entry = TextBlock()
entry.Text = "Entry"
entry.Left = 10
entry.Top = 10
canvas.AddChild(entry)
api.Chart.AddControl(canvas)