SetImage() 공개 메소드

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.
리턴 void
예제 #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);
 }
예제 #2
0
        private static void CreateThumbnailBitmap(TabbedThumbnail thumbnail, Control targetControl)
        {
            using (Bitmap bmp = new Bitmap(targetControl.Width, targetControl.Height))
            {
                targetControl.DrawToBitmap(bmp, targetControl.ClientRectangle);
                thumbnail.SetImage(bmp);
            }

            thumbnail.InvalidatePreview();
        }