Skip to content

VerticalAlignment

Summary

Describes vertical position related to an anchor point or a parent element.

Signature

1
public enum VerticalAlignment

Namespace

cAlgo.API

Fields

Name Description
Center Center vertical alignment.
Top Top vertical alignment.
Bottom Bottom vertical alignment.
Stretch Stretch vertical alignment.

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
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample shows how to use the VerticalAlignment
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class VerticalAlignmentSample : Indicator
     {
         [Parameter("Vertical Alignment", DefaultValue = VerticalAlignment.Center)]
         public VerticalAlignment VerticalAlignment { get; set; }
         protected override void Initialize()
         {
             var textBlock = new TextBlock
             {
                 Text = string.Format("Alignment: {0}", VerticalAlignment),
                 VerticalAlignment = VerticalAlignment,
                 HorizontalAlignment = HorizontalAlignment.Center
             };
             Chart.AddControl(textBlock);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also


Last update: July 1, 2022

Comments