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
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)
{
}
}
}
|
Properties
Orientation
Summary
Gets or sets the orientation of the child element.
Signature
| public Orientation Orientation {get; set;}
|
Return Value
Orientation
Related Tutorials
ItemWidth
Summary
Gets or sets the width of the item.
Signature
| public double ItemWidth {get; set;}
|
Return Value
double
ItemHeight
Summary
Gets or sets the height of the item.
Signature
| public double ItemHeight {get; set;}
|
Return Value
double