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.
usingcAlgo.API;namespacecAlgo{// This sample shows how to use the WrapPanel[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassWrapPanelSample:Indicator{[Parameter("Panel Orientation", DefaultValue = Orientation.Vertical)]publicOrientationPanelOrientation{get;set;}protectedoverridevoidInitialize(){varwrapPanel=newWrapPanel{BackgroundColor=Color.Gold,HorizontalAlignment=HorizontalAlignment.Center,VerticalAlignment=VerticalAlignment.Center,Orientation=PanelOrientation,Width=150,Height=150};for(inti=0;i<10;i++){wrapPanel.AddChild(newTextBlock{Text="Text",Margin=5,ForegroundColor=Color.Black,FontWeight=FontWeight.ExtraBold});}Chart.AddControl(wrapPanel);}publicoverridevoidCalculate(intindex){}}}
1 2 3 4 5 6 7 8 91011121314151617181920
importclrclr.AddReference("cAlgo.API")fromcAlgo.APIimport*classTest():definitialize(self):wrapPanel=WrapPanel()wrapPanel.BackgroundColor=Color.GoldwrapPanel.HorizontalAlignment=HorizontalAlignment.CenterwrapPanel.VerticalAlignment=VerticalAlignment.Center# PanelOrientation is parameter of Orientation type defined# in indicator C# filewrapPanel.Orientation=api.PanelOrientationforiinrange(10):textBlock=TextBlock()textBlock.Text="Text"textBlock.Margin=Thickness(5)textBlock.ForegroundColor=Color.BlacktextBlock.FontWeight=FontWeight.ExtraBoldwrapPanel.AddChild(textBlock)api.Chart.AddControl(wrapPanel)
Properties
Orientation
Summary
Gets or sets the orientation of the child element.