/// <summary>
        /// Raises the ThumbnailReady event</summary>
        /// <param name="e">Event args</param>
        protected virtual void OnThumbnailReady(ThumbnailReadyEventArgs e)
        {
            EventHandler <ThumbnailReadyEventArgs> handler = ThumbnailReady;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Example #2
0
        private void ThumbnailManager_ThumbnailReady(object sender, ThumbnailReadyEventArgs e)
        {
            // get rid of temporary thumbnail
            Uri resourceUri           = e.ResourceUri;
            ThumbnailControlItem item = GetItem(resourceUri);

            if (item != null)
            {
                if (item.Image != null)
                {
                    item.Image.Dispose();
                }
                item.Image = e.Image;
            }
            m_thumbnailControl.Invalidate();
        }