private void Refresh() { if (!this.isLoaded || string.IsNullOrEmpty(this.factionEntry.ClanTag)) { return; } if (this.viewModel != null) { this.DataContext = null; this.viewModel.Dispose(); } this.viewModel = new ViewModelFactionEntry(this.factionEntry, isLeaderboardEntry: false, isPreviewEntry: false); this.DataContext = this.viewModel; this.dialogWindow.GameWindow.Height = double.NaN; this.dialogWindow.GameWindow.RefreshWindowSize(); }
protected override void OnUnloaded() { this.DataContext = null; this.viewModel.Dispose(); this.viewModel = null; }