Skip to content

VerticalAlignment

enum cAlgo.API

DesktopCLICloud

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

Definition

public enum VerticalAlignment

Namespace: cAlgo.API · Group: Chart

Examples

using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use the VerticalAlignment
    public partial class VerticalAlignmentSample : Indicator
    {
        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)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        textBlock = TextBlock()
        textBlock.Text = f"Alignment: {api.VerticalAlignment}"
        textBlock.VerticalAlignment = api.VerticalAlignment
        textBlock.HorizontalAlignment = HorizontalAlignment.Center

        api.Chart.AddControl(textBlock)
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true,
  "Parameters": [
    {
      "Name": "VerticalAlignment",
      "DisplayName": "Vertical Alignment",
      "Type": "Enum",
      "EnumTypeFullName": "cAlgo.API.VerticalAlignment",
      "DefaultValue": "Center"
    }
  ]
}

Values

Name Value Description
Center 0 Center vertical alignment.
Top 1 Top vertical alignment.
Bottom 2 Bottom vertical alignment.
Stretch 3 Stretch vertical alignment.

See also