void Dispose(bool disposing) { if (!disposing) { return; } if (_thumbnailToolbarProxyWindow != null) { _thumbnailToolbarProxyWindow.Dispose(); } _thumbnailToolbarProxyWindow = null; // Don't dispose the thumbnail buttons // as they might be used in another window. // Setting them to null will indicate we don't need use anymore. ThumbnailButtons = null; }