3

We have a huge project in WPF .NET 4.0 which should support Windows XP SP3 and above. (hence the use of .NET 4.0) It has no problems whatsoever on Windows 7 and 8/8.1. However we're experiencing major visual issues when running on Windows XP to the point that the application is unusable.
I searched a lot and came across some similar questions such as this one but none of the suggested solutions worked for us.
Here's an screen shot taken on Windows XP SP3:
On Windows XP
The odd thing here is that there is clone of "28" TextBlock you see in the screen shot, to the left of it. They have everything in common except their name but the left one is not rendered properly!
And here is how it really looks like (taken on a Windows 8.1 test machine):
On Windows 8.1
Some pages are even worse:
Calendar
When I remove AllowsTransparency from the main window, it looks like this on XP: (Note that the title bar has no problems any more)
No Transparency
We're really stuck and have no clues about its cause. Any help would be appreciated.

Community
  • 1
  • 1
SepehrM
  • 1,087
  • 2
  • 20
  • 44
  • I think transparency on WinXP machines is one of the main root causes. They even have hotfixes out for it like this one: http://support2.microsoft.com/kb/975796. You'll have a lot of different results based on the GFX card in each machine. Just google "transparency with windows xp wpf" and you might find something useful. – Kcvin Oct 13 '14 at 17:36
  • @NETscape Thanks. I've seen that article but even with all the transparency disabled, we have major visual issues. – SepehrM Oct 13 '14 at 17:44
  • 1
    Are you using [cached composition](http://blogs.msdn.com/b/llobo/archive/2009/11/10/new-wpf-features-cached-composition.aspx)? I've noticed that visual artifacts in WPF are far more likely to occur when you're eating up lots of VRAM, and the easiest way to do that is with caching and effects. If you can, run your app with the Performance Profiling Tools for WPF (specifically, Perforator) and see what the video memory usage is like. Also keep an eye on SW/HW IRTs. – Mike Strobel Oct 13 '14 at 17:54
  • @MikeStrobel Yes, some overlay panels use bitmap caching and we have BlurEffect too. The VM's VRAM is 128MB. I'll check it with more VRAM and report back. Thanks a lot! – SepehrM Oct 13 '14 at 17:57
  • @MikeStrobel But doesn't WPF automatically fall back to software rendering and use RAM when the VRAM is full? – SepehrM Oct 13 '14 at 18:11
  • @SepehrM In theory, perhaps, but in my experience things often go haywire, and you end up with mismatched textures, severe artifacting, and any number of other visual issues. At least this seems to be the case when running on Windows XP. Did upping the VRAM help? – Mike Strobel Oct 13 '14 at 18:12
  • @MikeStrobel Not exactly. But it was related to graphics card. I wouldn't suspect that if it weren't for your help. – SepehrM Oct 13 '14 at 18:57

1 Answers1

1

It seems this problem is related to the graphic card. In another VM with a different graphics accelerator we didn't face any major problems. In the problematic test machine, we lowered hardware acceleration to the third level and the problem is gone.
Display Properties -> Settings -> Advanced -> Troubleshoot
Lowered Hardware Acceleration
Although there are still some small issues with some mouse over animations and we lost the benefits cursor accelerations bring to the table, it's acceptable for us since not much is expected from Windows XP.

SepehrM
  • 1,087
  • 2
  • 20
  • 44
  • @ErnodeWeerd This is just a virtual machine. WMware is responsible for its graphics acceleration and I'm no virtualization expert. – SepehrM Oct 13 '14 at 19:10