protected override void RefreshThumbnail(bool forceRefresh) { // To prevent flickering the old broken thumbnail is removed AFTER the new shiny one is created IDwmThumbnail obsoleteThumbnail = forceRefresh ? this._thumbnail : null; if ((this._thumbnail == null) || forceRefresh) { this.RegisterThumbnail(); } obsoleteThumbnail?.Unregister(); }
private void RegisterThumbnail() { this._thumbnail = this.WindowManager.GetLiveThumbnail(this.Handle, this.Id); this._thumbnail.Move(this._startLocation.X, this._startLocation.Y, this._endLocation.X, this._endLocation.Y); this._thumbnail.Update(); }