WrapPanel
Summary
Positions the child elements in sequential position from left to right, breaking content to the next line at theend of the containing box, from top to bottom, or from right to left.
Signature
| public class WrapPanel : Panel
|
Namespace
cAlgo.API
Properties
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
36
37 | using cAlgo.API;
namespace cAlgo
{
// This sample shows how to use the WrapPanel
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class WrapPanelSample : Indicator
{
[Parameter("Panel Orientation", DefaultValue = Orientation.Vertical)]
public Orientation PanelOrientation { get; set; }
protected override void Initialize()
{
var wrapPanel = new WrapPanel
{
BackgroundColor = Color.Gold,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
Orientation = PanelOrientation,
Width = 150,
Height = 150
};
for (int i = 0; i < 10; i++)
{
wrapPanel.AddChild(new TextBlock
{
Text = "Text",
Margin = 5,
ForegroundColor = Color.Black,
FontWeight = FontWeight.ExtraBold
});
}
Chart.AddControl(wrapPanel);
}
public override void Calculate(int index)
{
}
}
}
|
Last update: February 3, 2023