protected override void OnLoaded() { this.DataContext = this.viewModel = new ViewModelWindowTeleportConfirmationDialog(this.teleportWorldPosition); Instance = this; }
protected override void OnUnloaded() { this.DataContext = null; this.viewModel.Dispose(); this.viewModel = null; if (ReferenceEquals(Instance, this)) { Instance = null; } }