ChartDraggable.IsVisible
property · ChartDraggable · cAlgo.API Since 5.2
DesktopCLICloud
Get / set visibility of draggable.
Environment behaviour
CLI — not supported. Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires.
Cloud — not supported. Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires.
Definition
bool IsVisible {get; set;}
chartDraggable.IsVisible: bool
Returns bool
Examples
var draggable = Chart.Draggables.Add();
draggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };
draggable.IsVisible = Positions.Count > 0;
Print("Draggable visible: {0}", draggable.IsVisible);
draggable = api.Chart.Draggables.Add()
textBlock = TextBlock()
textBlock.Text = api.SymbolName
draggable.Child = textBlock
draggable.IsVisible = api.Positions.Count > 0
api.Print(f"Draggable visible: {draggable.IsVisible}")