简体   繁体   中英

How to get a snapshot image of what is under a window?

I want to fade a WPF window in, but I can't do that unless the window is set to transparent and window style is set to none, and I don't want that. Instead I want to create the illusion that the window is fading in by putting on top of it whatever is under it and then gradually reduce the opacity so it is brought into view.

I know that in order to to this another window with transparency and no borders must be used as the object that holds the captured image and performs the fade.

So in theory I know what I want, but I have no idea of how to capture as an image whatever is under a WPF window. Of course, the interface that I want to reveal will be hidden until the capture is performed, so the window on top doesn't capture the actual interface, and I will show the GUI only after the image has been captured, so it can be revealed after the image starts losing opacity.

That was just an explanation for what I need this. The basic question is: how do I capture to an image whatever is under a window (even if it requires the window to be transparent)?

在这里找到了一篇文章,描述了我需要执行的几种方法: http : //www.codeproject.com/Articles/91487/Screen-Capture-in-WPF-WinForms-Application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM