ControlBase.MaxWidth
property · ControlBase · cAlgo.API
DesktopCLICloud
Gets or sets the maximum width of the chart control.
Environment behaviour
CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Definition
public double MaxWidth {get; set;}
controlBase.MaxWidth: float
Returns double
Examples
var textBlock = new TextBlock { Text = "A long trading note that wraps when it reaches the maximum width", MaxWidth = 200, TextWrapping = TextWrapping.Wrap };
Chart.AddControl(textBlock);
Print("Maximum width: {0}", textBlock.MaxWidth);
textBlock = TextBlock()
textBlock.Text = "A long trading note that wraps when it reaches the maximum width"
textBlock.MaxWidth = 200
textBlock.TextWrapping = TextWrapping.Wrap
api.Chart.AddControl(textBlock)
api.Print(f"Maximum width: {textBlock.MaxWidth}")