Skip to content

Window.IsVisible

property · Window · cAlgo.API

DesktopCLICloud

Get / Set the window visibility flag, if Yes then the window will be shown otherwise it will be hidden

Environment behaviour

CLI — not supported. Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

Cloud — not supported. Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

Definition

public bool IsVisible {get;}
window.IsVisible: bool

Returns bool

Examples

var window = new Window { Title = "Toggle me", Width = 250, Height = 120 };
window.Show();
var toggleButton = new Button { Text = "Show / hide window" };
toggleButton.Click += args =>
{
    if (window.IsVisible)
        window.Hide();
    else
        window.Show();
};
Chart.AddControl(toggleButton);
window = Window()
window.Title = "Toggle me"
window.Width = 250
window.Height = 120
window.Show()
toggleButton = Button()
toggleButton.Text = "Show / hide window"
toggleButton.Click += lambda args: window.Hide() if window.IsVisible else window.Show()
api.Chart.AddControl(toggleButton)