protected override void Dispose(bool disposing) { if (_disposed) { return; } _disposed = true; if (disposing) { ImageElementManager.Dispose(this); if (Control != null) { _image.ImageOpened -= OnImageOpened; _image.ImageFailed -= OnImageFailed; } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } _disposed = true; if (disposing) { ImageElementManager.Dispose(this); if (Control != null) { Control.ImageOpened -= OnImageOpened; Control.ImageFailed -= OnImageFailed; Microsoft.UI.Xaml.Application.Current.Resuming -= OnResumingAsync; } } base.Dispose(disposing); }