2

I usually take screenshots of single windows via the built-in key combination Alt+Print. Unfortunately this does not work well for more and more applications - all of them are WPF applications.

Usually the screen shots have at least one of the following properties:

  • the screenshot is larger than expected and contains parts of the screen around the actual window

  • the screenshot has the correct size but includes parts of other windows, e.g. the Windows task bar. Of course the task bar might be in front of the window, but taking screen shots of "normal" programs works fine.

How do I take screenshots of WPF application which are correct in size and content?

I'd like to avoid the extra effort of checking all the screenshots for correctness, reproducing the situation, taking them again in case of issues or repairing/faking them manually in any pixel manipulation program (e.g. Paint.NET).

I observe this on Windows 7 x64 SP 1, all official updates installed, but it might apply to other Windows versions as well (not tested yet). .NET 4.5 is installed. The application itself might only need the built-in .NET 3.5.1.

It's reproducible on a virtual machine with the same settings.

Examples:

Screenshot of an application running in maximized mode. The screen shot includes parts of the task bar.

Screenshot 1 - maximized application showing task bar

Screenshot of a progress dialog which is behind the task bar. The screenshot also includes the task bar, while it doesn't for non WPF applications.

Screenshot 2 - progress bar behind the task bar

7
  • The key combination you are using should only capture the active window, even on a dual monitor setup, which works for all windows executables include wpf applications.
    – Ramhound
    Jun 2, 2014 at 14:02
  • 1
    Have you tried the Snipping Tool?
    – slybloty
    Jun 2, 2014 at 14:07
  • Usually a Problem comes up when applications are using "Ribbon", especially custom Ribbon Implementations that are not MS Office. Usually, the application is larger than it appears, and some of the content is transparent. Maybe that is the problem for you. Edit: Might be good to confirm if that is actually the case. Jun 2, 2014 at 14:08
  • @slybloty: Using the Snipping tool has the same problem. It shows the border of the window in red but also includes the taskbar when taking the screen shot. Jun 2, 2014 at 14:11
  • You might have to use an image manipulation application to alter the screenshots to your needs.
    – slybloty
    Jun 2, 2014 at 14:15

0

You must log in to answer this question.

Browse other questions tagged .