简体   繁体   中英

How do I convert a WPF window to a bitmap?

I want to take screen shots of all the windows associated with an application and allow the user to edit them. I am not sure how to convert a window to a bitmap image though.

I want to do something like this...

WindowCollection handles = Application.Current.Windows;
List<Image> windowList = new List<Image>();
foreach (Window window in handles)
{
do something here to turn each window into a bitmap
windowList.Add(bitmapFromWindow)
}

I have found related questions, but nothing that answers my question. If you find any related resources please post.

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