A question I’m often asked is, “what’s different about WPF in Windows Vista compared to the version that ships for Windows XP?” In the interests of transparency (which is what blogs are for, right?) I thought I’d address this here.
I think it’s important to start by noting that the goal of adding Windows XP support was to allow people to write WPF code without worrying whether some things would only run on Windows Vista. There aren’t a whole swathe of features that are set aside as Vista-exclusive, and that’s by design. At PDC 2003 when we announced WPF (then known by the codename of “Avalon”), almost every breakout session concluded with questions from developers who wanted to know how much of what they’d just seen would be available on Windows XP. Based on the strong feedback we heard at that conference, we backported WPF to Windows XP so that applications written using the technology could be deployed broadly even before Windows Vista reached critical mass.
Of course, Windows Vista will be a natural way many end-users get hold of WPF applications, purely because .NET Framework 3.0 is installed by default on that platform. For Windows XP, .NET Framework 3.0 is an optional download from Windows Update or a bootstrapped install when an IE 7 user first visits a WPF XBAP application. It’s a small thing, but having it installed and enabled by default makes a huge difference to how easy it is for people to deploy applications based on WPF, particularly in a locked-down, non-admin environment.
However, there are several optimizations made on Windows Vista that make it a worthy upgrade if you’re planning on extensive use of WPF:
- With DWM and a WDDM-class display driver, video RAM is virtualized so you don’t have to worry about WPF being forced into a software rendering mode because it’s run out of headroom;
- 3D anti-aliasing is available on Windows Vista with a WDDM driver;
- There’s work done to integrate with other parts of the platform that take advantage of the MIL, so for example the Magnifier accessibility tool in Windows Vista scales up WPF applications using vectors rather than bitmaps;
- WPF animations on Windows Vista should be smooth and tear free if the DWM is enabled;
- The tablet PC APIs expose a few minor Windows Vista-specific features relating to gesture support.
- When remoting between two machines running Windows Vista and DWM, the client-side rendering of a WPF app will be hardware accelerated. No hardware acceleration occurs if one or more of the machines is running Windows XP; bitmap remoting will be used. The performance difference can quite significant depending on the visual complexity/use of animations in the app.
That said, it’s important to note that the codebase is identical: we don’t build a separate Windows XP v. Windows Vista edition. Until later builds of Windows Vista when we switched to the final staged layout for faster installation, it was possible to find the dotnetfx3.exe self-extracting archive in a folder called sysmsicache. In fact, I used to use this trick often myself to ensure that two side-by-side machines running different versions of Windows had the identical bits installed.
Of course, a “designed for Windows Vista” application could include other Vista-specific features: everything from new Vista shell capabilities like task dialogs and common file dialogs to peer-to-peer, search integration, sidebar, power management etc. If you use one of these Windows Vista features, your application should gracefully degrade for Windows XP as appropriate.
Hope this is useful!