Defines the thickness of the frame around the rectangle.


public sealed struct Thickness : ValueType


Bottom PropertyGets or sets the thickness of the bottom side of the retangle.
Equals MethodDefines whether the specified object is equal to this instance.
GetHashCode MethodReturns the hash code for this instance.
Left PropertyGets or sets the thickness of the left side of the retangle.
Right PropertyGets or sets the thickness of the right side of the retangle.
Thickness MethodInitializes a new instance of the Thickness structure.
Top PropertyGets or sets the thickness of the top side of the retangle.

Example 1

using cAlgo.API;
namespace cAlgo
    // This sample shows how to use Thickness for defining a chart control margin
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ThicknessSample : Indicator
        protected override void Initialize()
            var stackPanel = new StackPanel
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment = VerticalAlignment.Center,
                BackgroundColor = Color.Gold,
                Opacity = 0.6
            var rectangle = new Rectangle
                StrokeColor = Color.Blue,
                FillColor = Color.Red,
                StrokeThickness = 2,
                Margin = new Thickness(10, 5, 10, 5),
                Width = 300,
                Height = 100,
        public override void Calculate(int index)