AllowTransparency=Sucks (Hardware Rendering Sucks)
Oh, sorry, that should read ‘AllowTransparency=True creates poor performance’. In WPF, if you have AllowTransparency=True (and thus WindowStyle=None) set, you’re able to create non-rectangular applications as well as making use of semi-transparency. It is certainly a welcome ‘feature’, especially when you’re trying to go along the general guidelines of WPF of bringing design back to the desktop.
Unfortunately in reality, it sucks. Using WPFPerf, the same animation (in this case, resizing of text from 16 to 24 over 0.5s) goes from ~50FPS with AllowTransparency=False to between 3 and 14FPS with it set to True. I can manipulate multiple high definition video fine, but throw in just the mere thought of transparency, and it slows to a crawl. This is extremely disappointing, as I’ve said the performance of WPF isn’t too bad.
There is a solution however, an entirely unworkable solution! That solution is….disable hardware rendering. Yes, that’s right, if you force software rendering, performance of AllowTranparency=True goes up to usable levels. It wasn’t as good as hardware acceleration + AllowTransparency=False, but it never dipped below 30FPS which is more than usable.. You can do disable hardware rendering by adding a registry key (note, the page says ‘Microsof’ as the key, but it needs ‘Microsoft’). There is meant to be a way to disable it on a per-application basis, but I can’t seem to find many details apart from the one blog post that mentioned it.
Yahoo’s Vista/WPF IM client has been noted to have poor performance, particularly around their emoticon selection popup. Sure enough, disabling hardware acceleration saw a large improvement to the speed which it popped up, and how smoothly the emoticons animated. Some things were slower with it disabled, but that isn’t really the point. Hardware acceleration was supposed to bring an age of enhanced performance with more complex/prettier UI’s!
Knowledge base article 937106 acknowledges the performance issue…for Windows XP and Server 2003. That’s just great, good thing nobody would run WPF on Vista, eh? Apparently .NET 3.0 SP1, .NET 3.5 and Vista SP1 address these performance concerns, but unfortunately, my application was targeting .NET 3.5, and I already have .NET 3.0 SP1 installed.
Long story short, the idea of WPF/XAML rocks, but the odd performance of it needs to be fixed, and in the meantime much better documentation on what triggers poor hardware (or poor software) rendering performance.




[...] my previous post about WPF Performance, I blasted the poor performance associated with transparency being enabled. The [...]