StackPanel
Summary
Arranges the child element into a single line that can be oriented horizontally or vertically.
Signature
| public class StackPanel : Panel
|
Namespace
cAlgo.API
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | using cAlgo.API;
namespace cAlgo
{
// This sample shows how to use the StackPanel
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class StackPanelSample : Indicator
{
[Parameter("Panel Orientation", DefaultValue = Orientation.Vertical)]
public Orientation PanelOrientation { get; set; }
protected override void Initialize()
{
var stackPanel = new StackPanel
{
BackgroundColor = Color.Gold,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
Orientation = PanelOrientation
};
for (int i = 0; i < 10; i++)
{
stackPanel.AddChild(new TextBlock
{
Text = "Text",
Margin = 5,
ForegroundColor = Color.Black,
FontWeight = FontWeight.ExtraBold
});
}
Chart.AddControl(stackPanel);
}
public override void Calculate(int index)
{
}
}
}
|
Properties
Orientation
Summary
Gets or sets the StackPanel orientation.
Signature
| public Orientation Orientation {get; set;}
|
Return Value
Orientation
Related Tutorials