Skip to content

Orientation

Summary

Defines the different orientations that panel layout can have.

Signature

1
public enum Orientation

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
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample indicator shows how to set stack and wrap panels orientation
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class OrientationSample : Indicator
     {
         [Parameter("Orientation", DefaultValue = Orientation.Vertical)]
         public Orientation Orientation { get; set; }
         protected override void Initialize()
         {
             var stackPanel = new StackPanel
             {
                 Orientation = Orientation,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
                 BackgroundColor = Color.Gold,
                 Opacity = 0.7,
             };
             stackPanel.AddChild(new TextBlock { Text = "First TextBlock", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });
             stackPanel.AddChild(new TextBlock { Text = "Second TextBlock", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });
             stackPanel.AddChild(new TextBlock { Text = "Third TextBlock", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });
             stackPanel.AddChild(new TextBlock { Text = "Fourth TextBlock", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });
             Chart.AddControl(stackPanel);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

Fields

Horizontal

Summary

Elements in the panel layout should be horizontally oriented.

Signature

1
public static Orientation Horizontal;

Return Value

Orientation

Vertical

Summary

Elements in the panel layout should be vertically oriented.

Signature

1
public static Orientation Vertical;

Return Value

Orientation