Freigeben über


WPF 4 and Visual Studio 2010 performance on Tablets and Touch-enabled machines

In Microsoft .NET Framework 4, WPF added UI Automation (UIA) virtualization support. This did not exist in WPF in previous .Net releases.

This allows any WPF app that target NET4 and have virtualized elements (such as ListView, Tree View, etc ) to benefits from significantly improved performance on machines that have Accessibility clients running (for example: Screen Reader). 

This is typical on Tablet and other touch-enabled machines because the Accessibility clients TabTip.exe (the "Tablet PC Input Panel") is running by default.

It is also common on non-tablet machines since any machine can run UI Automation client app (for example, UI Spy, Narrator, Magnifier, etc) or have devices connected that also use UI Automation (for example, Wacom touch & pen input type device)

Visuals Studio 2010 is an example of a WPF 4 app that uses virtualized WPF elements and can benefit from the UIA Virtualization.

For the UIA virtualization to work, under the covers WPF uses Windows Automation API 3.0 (aka "UI Automation API 3.0").

These APIs are included by default on Windows 7 & Windows 2008 Server R2.

The gotcha is that the Windows Automation API 3.0 are not included on other down-level OS's (such as XP/Vista) and must be installed separately in order to get the full Perf benefits.

These APIs can be installed fromthis location:  https://support.microsoft.com/kb/971513/
Please note that the download site currently do not support XP 64 bit and you musty have the latest SP installed (e.g. Vista SP2, XP SP3)

So in summary:
Do you notice VS 2010 or other WPF based app performance issues?

  • If your machine is Windows 7 or Windows 2008 Server R2, you should be fine. There is nothing for you to do.
  • Otherwise, if your machine has any of below:
    • A Tablet PC (even if you aren't using the pen)
    • Has multi-touch screen drivers enabled
    • Has an external input device like a pen or Wacom tablet
    • Has a screen-reader enabled or have other UIA Client app running (such as UI Spy or Narrator)
  • Then install Windows Automation API 3.0

Related blogs:
WPF 3.5 SP1 Performance on Tablet & Touch-enabled machinesThis blog is about improving UI Automation for WPF 3.5 SP1 apps and has no impact on .NET 4 RC apps or later nor Visual Studio 2010 RC or later. The reason is that this optimization is already included in .NET 4 RC or later. Note that we now have a Hotfix for .NET 3.5 SP1, see here.

Intellisense Crashing on VS 2010 RC
This blog discusses crashes in VS 2010 RC when using Intelisense which are related UIA but is a separate issue from UIA performance issue above.
You would still need to install Windows Automation API 3.0 on XP/Vista to get the optimal perf for WPF 4 and Visual Studio 2010