[.net] WPF... the future now?

Started by
6 comments, last by Gluber2007 16 years, 6 months ago
Hi!! Do you guys know if WPF is available now, and ready to be used within Win XP provided I have the .NET 3.0 runtimes? Since WPF is Vista's girlfriend, I bet there are lots of things implemented in the classes that aren't available in Win XP? What happens then? I get compilation errors or simply at runtime the framework fails to open the application because of unknown references or something? Do you guys know if I can use "Windows SDK" (aka 6.1.6000.16384.10.WindowsSDK_Vista_Feb2007Update_rtm.DVD.Rel.iso) with the express edition of Visual Studio C# and that's all I'd need to code and run WPF-powered applications on Win XP? Thank you very much!
Advertisement
Yes, you can use WPF in XP SP2 and Windows Server 2003. You need to have .net 3.0 installed. See the WPF forums for a lot of directed help on using it.
Thanks a lot frob [wink]
There aren't many differences in WPF between Vista and XP. This blog discusses some of them. The one other difference I remember had to do with transparent windows, but I can't remember exactly what or if it was a feature or performance difference.

Regardless, your WPF apps shouldn't have much trouble at all running on XP :)

One of the main difference is that for example if you use Transparent Windows
( e.g for irregular shaped windows ) on XP WPF switches to full software rendering.
On Vista this is still rendered through D3D.
This is mainly due to on XP WPF has to work with the traditional Windows API and
describe the window in GDI region entries, while on VISTA it can use the DWM to achieve the same effect.

For normal windows there is really no difference between XP and VISTA.

Oh and one other little experience of mine:

If you consider WPF for doing graphically rich 2D Games ( or really simple 3D )
reconsider.

Most of those kind of games target the casual market where you have to run on old
hardware with little RAM,slow CPU and crappy 3D Card ( often with outdated drivers )
It makes no sense to target Casual Games at high end hardware..

The problem with WPF in that context is that it is "everything" you can achieve very much, and almost anything is possible. This comes at a price though, its CPU/Memory usage is very high and that didn't count in the driver problems.

We recently did an evaluation if we could use WPF for 2D Games now, and it failed to live up to our expecations. 60 MB Memory usage for a simple window with some buttons is too high a cost for the casual market. You can easily get a 2D Game which uses 300+ MB of Ram if you use WPF naivly ( you would have to use pooled allocations, and other optimizations to get it to reasonable memory usage
)

This is just a no no for now.

We switched back to our custom D3D based 2D Gui library, and got the same effect within 2 MB of Memory.


So in essence:
Is Wpf exiting : yes
Is Wpf the way of the future: probably yes.
Is Wpf ready to be used in current generation casual games: no
This is what I love about this place, everybody is really helpful!

Thanks a lot guys!!
I think I have to give it a thought, but its nice to see differences between XP-Vista are not many except for transparency and other bits :)
Btw, before anyone nitpicks on my post :-)

Both scenarios i describe are running on the NET 2.0 CLR, and memory usage takes into account the NET Framework base memory usage as well as the assemblies loaded.
The 60 vs 2 MB is ONLY the real memory usage atop of that, so i am not comparing apples to oranges here.

This topic is closed to new replies.

Advertisement