protected override void Dispose(bool disposing) { if (!disposing) { return; } this.RootElement.Dispose(); ThemeResolutionService.UnsubscribeFromThemeChanged((IThemeChangeListener)this); }
internal protected virtual void Dispose(bool disposing) { //we are already disposed of if (this.isDisposed) { return; } this.disposing = true; if (disposing) { elementPropertyChangeEventList.Dispose(); this.RootElement.Dispose(); } ThemeResolutionService.UnsubscribeFromThemeChanged(this); this.disposing = false; this.isDisposed = true; }