WindowLocationChangedEventArgs.Window
property · WindowLocationChangedEventArgs · cAlgo.API
DesktopCLICloud
The window which it is location changed
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (Window.LocationChanged).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Window.LocationChanged).
Definition
public Window Window {get;}
windowLocationChangedEventArgs.Window: Window
Returns Window
Examples
protected override void OnStart()
{
var window = new Window { Title = "Trade Panel", Width = 300, Height = 200 };
window.LocationChanged += OnWindowLocationChanged;
window.Show();
}
private void OnWindowLocationChanged(WindowLocationChangedEventArgs args)
{
if (args.Window.Left < 0)
args.Window.Left = 0;
}
def on_start(self):
window = Window()
window.Title = "Trade Panel"
window.Width = 300
window.Height = 200
window.LocationChanged += self.on_window_location_changed
window.Show()
def on_window_location_changed(self, args):
if args.Window.Left < 0:
args.Window.Left = 0