usingcAlgo.API;namespacecAlgo{// A sample indicator that shows how to use Border chart control[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassBorderSample:Indicator{protectedoverridevoidInitialize(){varborder=newBorder{BorderColor=Color.Yellow,BorderThickness=2,Opacity=0.5,BackgroundColor=Color.Violet,HorizontalAlignment=HorizontalAlignment.Right,VerticalAlignment=VerticalAlignment.Bottom,Width=200,Height=100,Margin=10};varstackPanel=newStackPanel{Orientation=Orientation.Vertical};stackPanel.AddChild(newTextBlock{Text="Text",Margin=5,HorizontalAlignment=HorizontalAlignment.Center,FontWeight=FontWeight.ExtraBold});stackPanel.AddChild(newButton{Text="Button",Margin=5,HorizontalAlignment=HorizontalAlignment.Center,FontWeight=FontWeight.ExtraBold});stackPanel.AddChild(newTextBox{Text="Type text...",Margin=5,HorizontalAlignment=HorizontalAlignment.Center,FontWeight=FontWeight.ExtraBold,Width=100});border.Child=stackPanel;Chart.AddControl(border);}publicoverridevoidCalculate(intindex){}}}
Gets or sets the border thickness. Property value can be set using Thickness, number, or a string new Thickness(5),new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
Signature
1
publicThicknessBorderThickness{get;set;}
Return Value
Thickness
Padding
Summary
Gets or sets the border padding thickness. Property value can be set using Thickness, number, or a string newThickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
Signature
1
publicThicknessPadding{get;set;}
Return Value
Thickness
CornerRadius
Summary
Gets or sets the border corner radius. Property value can be set using CornerRadius, number, or a string: newCornerRadius(5), new CornerRadius(1, 2, 3, 4).
Gets or sets the border line color. Check the Color class for the ARGB (alpha, red, green, blue) color values, oruse the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red","#ff0000".
Signature
1
publicColorBorderColor{get;set;}
Return Value
Color
BackgroundColor
Summary
Gets or sets the color of the border background. Check the Color class for the ARGB (alpha, red, green, blue) colorvalues, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"),"Red", "#ff0000".