/// <summary> /// Method used to dispose the controls used in ApplicationMenu.xaml. /// </summary> /// <param name="e">Specifies the cancel event.</param> protected override void OnClosing(CancelEventArgs e) { // Release all managed resources if (this.Resources != null) { this.Resources.Clear(); } if (this.mainRibbon != null) { this.mainRibbon.Dispose(); this.mainRibbon = null; } if (this.ribbonStatusBar != null) { this.ribbonStatusBar = null; } if (this._applicationMenu != null) { this._applicationMenu.Dispose(); this._applicationMenu = null; } if (this.editor != null) { this.editor = null; } GettingStartedViewModel.Dispose(); base.OnClosing(e); }
protected override void Dispose(bool disposing) { // Release all managed resources if (this.Resources != null) { this.Resources.Clear(); } if (this.mainRibbon != null) { this.mainRibbon.Dispose(); this.mainRibbon = null; } if (this.editor != null) { this.editor = null; } GettingStartedViewModel.Dispose(); base.Dispose(disposing); }