Skip to content

ControlProperty

Summary

Represents the Control property enumeration used in Style to get or set a style for a specific property.

Signature

1
public enum ControlProperty

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
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample shows how to use ControlProperty in control style
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ControlPropertySample : Indicator
     {
         protected override void Initialize()
         {
             var style = new Style();
             style.Set(ControlProperty.Margin, 5);
             style.Set(ControlProperty.ForegroundColor, Color.Blue);
             style.Set(ControlProperty.FontSize, 14);
             style.Set(ControlProperty.Width, 100);
             var textBlock = new TextBlock
             {
                 Text = "Styled Text Block",
                 Style = style,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center
             };
             Chart.AddControl(textBlock);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also

Fields

BackgroundColor

Summary

The background color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".

Signature

1
public static ControlProperty BackgroundColor;

Return Value

ControlProperty

ForegroundColor

Summary

The foreground color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".

Signature

1
public static ControlProperty ForegroundColor;

Return Value

ControlProperty

Opacity

Summary

The opacity of the control. Can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0.

Signature

1
public static ControlProperty Opacity;

Return Value

ControlProperty

MinWidth

Summary

The minimum width of the control.

Signature

1
public static ControlProperty MinWidth;

Return Value

ControlProperty

MaxWidth

Summary

The maximum width of the control.

Signature

1
public static ControlProperty MaxWidth;

Return Value

ControlProperty

MinHeight

Summary

The minimum hight of the control.

Signature

1
public static ControlProperty MinHeight;

Return Value

ControlProperty

MaxHeight

Summary

The maximum hight of the control.

Signature

1
public static ControlProperty MaxHeight;

Return Value

ControlProperty

Width

Summary

The width of the control.

Signature

1
public static ControlProperty Width;

Return Value

ControlProperty

Height

Summary

The height of the control.

Signature

1
public static ControlProperty Height;

Return Value

ControlProperty

Padding

Summary

The padding of the control. 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 static ControlProperty Padding;

Return Value

ControlProperty

BorderThickness

Summary

The thickness of the border of the control. 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 static ControlProperty BorderThickness;

Return Value

ControlProperty

CornerRadius

Summary

The radius of the corner of the control. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).

Signature

1
public static ControlProperty CornerRadius;

Return Value

ControlProperty

HorizontalContentAlignment

Summary

The horizontal content alignment.

Signature

1
public static ControlProperty HorizontalContentAlignment;

Return Value

ControlProperty

VerticalContentAlignment

Summary

The vertical content alignment.

Signature

1
public static ControlProperty VerticalContentAlignment;

Return Value

ControlProperty

TextAlignment

Summary

The alignment of the content.

Signature

1
public static ControlProperty TextAlignment;

Return Value

ControlProperty

Margin

Summary

The margin of the content. 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 static ControlProperty Margin;

Return Value

ControlProperty

FontWeight

Summary

The content font weight. Property value can be set using the FontWeight enumerations: FontWeight.Bold, FontWeight.SemiBold, FontWeight.Light, FontWeight.Thin, etc.

Signature

1
public static ControlProperty FontWeight;

Return Value

ControlProperty

FontStyle

Summary

The content font style. Property value can be set using the FontStyle enumeration: FontWeight.Italic or FontWeight.Oblique.

Signature

1
public static ControlProperty FontStyle;

Return Value

ControlProperty

FontFamily

Summary

The font family.

Signature

1
public static ControlProperty FontFamily;

Return Value

ControlProperty

FontSize

Summary

The font size.

Signature

1
public static ControlProperty FontSize;

Return Value

ControlProperty

BorderColor

Summary

The border color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".

Signature

1
public static ControlProperty BorderColor;

Return Value

ControlProperty

CaretColor

Summary

The caret color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".

Signature

1
public static ControlProperty CaretColor;

Return Value

ControlProperty