ControlBase
class cAlgo.API
DesktopCLICloud
Represents the base of chart controls.
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 ControlBase
Namespace: cAlgo.API · Group: Controls
Examples
var textBlock = new TextBlock { Text = "Spread monitor", Margin = 10, Opacity = 0.8 };
textBlock.HorizontalAlignment = HorizontalAlignment.Right;
textBlock.VerticalAlignment = VerticalAlignment.Top;
Chart.AddControl(textBlock);
Print("Control {0} added", textBlock.UniqueId);
textBlock = TextBlock()
textBlock.Text = "Spread monitor"
textBlock.Margin = Thickness(10)
textBlock.Opacity = 0.8
textBlock.HorizontalAlignment = HorizontalAlignment.Right
textBlock.VerticalAlignment = VerticalAlignment.Top
api.Chart.AddControl(textBlock)
api.Print(f"Control {textBlock.UniqueId} added")
Methods
| Name | Description |
|---|---|
ResetPropertyDesktopCLICloudvoid | Sets the property to the default value and removes its privelege over the style. |
Properties
| Name | Description |
|---|---|
BottomDesktopCLIClouddouble | Gets or sets the position of the chart control to the bottom of the chart area. Works only when the control is inside the Canvas panel. |
DockDesktopCLICloudDock | Specifies the dock position of the chart control instance. Works only inside the DockPanel. |
HeightDesktopCLIClouddouble | Gets or sets the hight of the chart control. |
HorizontalAlignmentDesktopCLICloudHorizontalAlignment | Gets or sets the horizontal alignment of the chart control instance. |
IsEnabledDesktopCLICloudbool | Gets or sets the value indicating whether this instance of the chart control is enabled. |
IsHitTestVisibleDesktopCLICloudbool | Gets or sets a value that declares if the chart control instance is visible for the mouse hit testing. If set to false, then the control will not handle any mouse events. |
IsVisibleDesktopCLICloudbool | Gets or sets the value indicating whether this instance of the chart control instance is visible. |
LeftDesktopCLIClouddouble | Gets or sets the position of the chart control to the left side of the chart area. Works only when the control is inside the Canvas panel. |
MarginDesktopCLICloudThickness | 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". |
MaxHeightDesktopCLIClouddouble | Gets or sets the maximum height of the chart control. |
MaxWidthDesktopCLIClouddouble | Gets or sets the maximum width of the chart control. |
MinHeightDesktopCLIClouddouble | Gets or sets the minimum height of the chart control. |
MinWidthDesktopCLIClouddouble | Gets or sets the minimum width of the chart control. |
OpacityDesktopCLIClouddouble | Gets or sets the level of opacity of the chart control instance. Can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0. |
RightDesktopCLIClouddouble | Gets or sets the position of the chart control to the rignt side of the chart area. Works only when the control is inside the Canvas panel. |
StyleDesktopCLICloudStyle | Gets or sets the style of a chart control. |
TopDesktopCLIClouddouble | Gets or sets the position of the chart control to the top of the chart area. Works only when the control is inside the Canvas panel. |
UniqueIdDesktopCLICloudGuid | Gets the unique identifier of a chart control. |
VerticalAlignmentDesktopCLICloudVerticalAlignment | Gets or sets the vertical alignment of the chart control instance. |
WidthDesktopCLIClouddouble | Gets or sets the width of the chart control. |