Skip to content

Control

class cAlgo.API

DesktopCLICloud

Represents the Chart Control 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 abstract class Control : ControlBase

Namespace: cAlgo.API · Group: Controls · Inherits: ControlBase

Examples

var controls = new Control[] { new TextBlock { Text = "Volume" }, new TextBox { Text = "0.01" }, new Button { Text = "Buy" } };
var panel = new StackPanel { Orientation = Orientation.Horizontal };
foreach (var control in controls)
{
    control.FontSize = 13;
    control.FontFamily = "Segoe UI";
    control.Margin = 3;
    panel.AddChild(control);
}
Chart.AddControl(panel);
label = TextBlock()
label.Text = "Volume"
button = Button()
button.Text = "Buy"
panel = StackPanel()
panel.Orientation = Orientation.Horizontal
for control in [label, button]:
    control.FontSize = 13
    control.FontFamily = "Segoe UI"
    panel.AddChild(control)
api.Chart.AddControl(panel)

Properties

Name Description
BackgroundColorDesktopCLICloudColor Gets or sets the color of the chart control background.
FontFamilyDesktopCLICloudstring Gets or sets the font family.
FontSizeDesktopCLIClouddouble Gets or sets the font size.
FontStyleDesktopCLICloudFontStyle Gets or sets the font style.
FontWeightDesktopCLICloudFontWeight Gets or sets the font weight.
ForegroundColorDesktopCLICloudColor Gets or sets the color of the chart control foreground. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
HorizontalContentAlignmentDesktopCLICloudHorizontalAlignment Gets or sets the horizontal content alignment.
PaddingDesktopCLICloudThickness Gets or sets the chart control padding. 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".
VerticalContentAlignmentDesktopCLICloudVerticalAlignment Gets or sets the vertical content alignment.

Inherited members

From ControlBase: ResetProperty, UniqueId, Style, Left, Top, Right, Bottom, Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight, IsEnabled, IsVisible, Opacity, Margin, VerticalAlignment, HorizontalAlignment, Dock, IsHitTestVisible

See also