The codebase is identical but there are optimizations for VistaHave you ever been interested in a comparison between WPF running on Windows Vista and on Windows XP? If that is the case, then you will be happy to find out that Tim Sneath, a Windows Vista Technical Evangelist, has made the conclusions of such a transparency available.
Microsoft unveiled Windows Presentation Foundation (WPF) at PDC 2003 under the codename Avalon, as a next-generation presentation sub-system for Windows. "It provides developers and designers with a unified programming model for building rich Windows smart client user experiences that incorporate UI, media, and documents," reads Microsoft's description of the product.
Initially, the development of WPF was focused on Windows Vista. According to Sneath, the Redmond Company has decided to add support for Windows XP, in order to deliver the same functionality as for Vista.
"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," explained Sneath.
In fact, the codebase is identical for both Vista and XP as there are not two different editions of WPF for each operating system. WPF was only backported to XP. In this context, it is only natural that Microsoft has implemented a set of optimizations specific for Vista. Sneath delivered insight on what they are:
- 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 are running Windows XP; bitmap remoting will be used. The performance difference can be quite significant depending on the visual complexity/use of animations in the app.