Summary
Positions the child elements in sequential position from left to right, breaking content to the next line at the end of the containing box, from top to bottom, or from right to left.
Syntax
public class WrapPanel : Panel
Members
Name | Type | Summary |
---|---|---|
ItemHeight | Property | Gets or sets the height of the item. |
ItemWidth | Property | Gets or sets the width of the item. |
Orientation | Property | Gets or sets the orientation of the child element. |
WrapPanel | Method | Initializes a new instance of the WrapPanel class. |
Example 1
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) { } } }