Microsoft.WindowsAPICodePack.Taskbar.TabbedThumbnail.SetImage C# (CSharp) Method

SetImage() public method

Override the thumbnail and peek bitmap. By providing this bitmap manually, Thumbnail Window manager will provide the Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. Use this property to update the bitmap whenever the control is updated and the user needs to be shown a new thumbnail on the taskbar preview (or aero peek).
If the bitmap doesn't have the right dimensions, the DWM may scale it or not render certain areas as appropriate - it is the user's responsibility to render a bitmap with the proper dimensions.
public SetImage ( Bitmap bitmap ) : void
bitmap System.Drawing.Bitmap The image to use.
return void
        public void SetImage(Bitmap bitmap)
        {
            if (bitmap != null)
            {
                SetImage(bitmap.GetHbitmap());
            }
            else
            {
                SetImage(IntPtr.Zero);
            }
        }

Same methods

TabbedThumbnail::SetImage ( IntPtr hBitmap ) : void

Usage Example

Example #1
0
 public void InitalizeDWM()
 {
     TabbedThumbnail thumbnail = new TabbedThumbnail(this.Handle, Editor);
     TaskbarManager.Instance.TabbedThumbnail.AddThumbnailPreview(thumbnail);
     thumbnail.SetImage(new Bitmap(Editor.Image));
     thumbnail.DisplayFrameAroundBitmap = false;
     thumbnail.Title = "Paint Bucket";
     thumbnail.SetWindowIcon(this.Icon);
 }
All Usage Examples Of Microsoft.WindowsAPICodePack.Taskbar.TabbedThumbnail::SetImage