protected override void WindowClosing() { this.suppressInputContext.Stop(); this.suppressInputContext = null; this.DataContext = null; this.viewModel.Dispose(); this.viewModel = null; }
protected override void WindowOpening() { this.suppressInputContext = ClientInputContext .Start("Window items browser - intercept all other input") .HandleAll(() => { if (ClientInputManager.IsButtonDown(GameButton.CancelOrClose)) { this.CloseWindow(); } ClientInputManager.ConsumeAllButtons(); }); this.DataContext = this.viewModel = new ViewModelWindowEditorItemsBrowser( closeCallback: () => this.CloseWindow()); }