Dock
enum cAlgo.API
DesktopCLICloud
Specifies where a chart control will be docked inside the DockPanel.
Definition
public enum Dock
Namespace: cAlgo.API · Group: Layout
Examples
var dockPanel = new DockPanel { Width = 300, Height = 150, BackgroundColor = Color.DarkSlateGray };
dockPanel.AddChild(new TextBlock { Text = "Top", Dock = Dock.Top });
dockPanel.AddChild(new TextBlock { Text = "Left", Dock = Dock.Left });
dockPanel.AddChild(new TextBlock { Text = "Right", Dock = Dock.Right });
dockPanel.AddChild(new TextBlock { Text = "Bottom", Dock = Dock.Bottom });
Chart.AddControl(dockPanel);
dockPanel = DockPanel()
dockPanel.Width = 300
dockPanel.Height = 150
dockPanel.BackgroundColor = Color.DarkSlateGray
for text, dock in [("Top", Dock.Top), ("Left", Dock.Left), ("Right", Dock.Right), ("Bottom", Dock.Bottom)]:
textBlock = TextBlock()
textBlock.Text = text
textBlock.Dock = dock
dockPanel.AddChild(textBlock)
api.Chart.AddControl(dockPanel)
Values
| Name | Value | Description |
|---|---|---|
Left | 0 | Dock to the left side of the DockPanel. |
Top | 1 | Dock to the top of the DockPanel. |
Right | 2 | Dock to the right side of the DockPanel. |
Bottom | 3 | Dock to the bottom of the DockPanel. |