WindowSizeChangedEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for WindowSizeChanged event handlers
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (Window.SizeChanged).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Window.SizeChanged).
Definition
public class WindowSizeChangedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
protected override void OnStart()
{
var window = new Window { Title = "Trade Panel", Width = 300, Height = 200, Child = new TextBlock { Text = "Hello" } };
window.SizeChanged += OnWindowSizeChanged;
window.Show();
}
private void OnWindowSizeChanged(WindowSizeChangedEventArgs args)
{
Print("Window {0} resized to {1} x {2}", args.Window.Title, args.Window.Width, args.Window.Height);
}
def on_start(self):
text_block = TextBlock()
text_block.Text = "Hello"
window = Window()
window.Title = "Trade Panel"
window.Width = 300
window.Height = 200
window.Child = text_block
window.SizeChanged += self.on_window_size_changed
window.Show()
def on_window_size_changed(self, args):
api.Print(f"Window {args.Window.Title} resized to {args.Window.Width} x {args.Window.Height}")
Properties
| Name | Description |
|---|---|
WindowDesktopCLICloudWindow | The window which it is size changed |