Skip to content

Border

Summary

Represents the border.

Signature

1
public class Border : ControlBase

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 using cAlgo.API;
 namespace cAlgo
 {
     // A sample indicator that shows how to use Border chart control
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class BorderSample : Indicator
     {
         protected override void Initialize()
         {
             var border = new Border
             {
                 BorderColor = Color.Yellow,
                 BorderThickness = 2,
                 Opacity = 0.5,
                 BackgroundColor = Color.Violet,
                 HorizontalAlignment = HorizontalAlignment.Right,
                 VerticalAlignment = VerticalAlignment.Bottom,
                 Width = 200,
                 Height = 100,
                 Margin = 10
             };
             var stackPanel = new StackPanel
             {
                 Orientation = Orientation.Vertical
             };
             stackPanel.AddChild(new TextBlock
             {
                 Text = "Text",
                 Margin = 5,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 FontWeight = FontWeight.ExtraBold
             });
             stackPanel.AddChild(new Button
             {
                 Text = "Button",
                 Margin = 5,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 FontWeight = FontWeight.ExtraBold
             });
             stackPanel.AddChild(new TextBox
             {
                 Text = "Type text...",
                 Margin = 5,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 FontWeight = FontWeight.ExtraBold,
                 Width = 100
             });
             border.Child = stackPanel;
             Chart.AddControl(border);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also

Properties

Child

Summary

Gets or sets the border child object.

Signature

1
public ControlBase Child {get; set;}

Return Value

ControlBase

BorderThickness

Summary

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
public Thickness BorderThickness {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
public Thickness Padding {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).

Signature

1
public CornerRadius CornerRadius {get; set;}

Return Value

CornerRadius

Related Tutorials

BorderColor

Summary

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
public Color BorderColor {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".

Signature

1
public Color BackgroundColor {get; set;}

Return Value

Color