How do I convert a WPF window to a bitmap?

2019-09-12 08:03发布

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.

1条回答
登录 后发表回答