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;
                }
            }

            base.Dispose(disposing);
        }
Example #2
0
        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);
        }