views:

55

answers:

2

I have an application that has some controls that use GDI+, mostly simple stuff with low graphics rendering requirements although I do have a couple of animated GDI+ windows that are borederline usable because of poor GDI+ performance.

Moving forward I would like to start using WPF (for performance and to learn WPF) but I also like to keep code compatible with Mono. As such I was wondering if I should or could develop using Silverlight (Moonlight in Mono). That way I get some WPF skills (I undertand silverlight is a subset of WPF?) and good performance.

+1  A: 

Silverlight is indeed a subset of WPF allthough there are quite some details that work differently. Moonlight is currently compatible to Silverlight 2.0 but Microsoft is at 4.0 now with Silverlight. Moonlight will probably be always far behind Silverlight and even farer behind WPF. But if you can live with that, Moonlight might be a good choice. However if you will probably not see any perfomance improvements because Mono is using Cairo for rendering both GDI+ and Moonlight. I also expect Mono's GDI+ implementation to be much more mature that the low level rendering APIs of Moonlight.

bitbonk
+1  A: 

Silverlight/Moonlight is a far better choice for any type of graphics and animations. GDI+ is old, and the Mono implementation exists mainly to support Winforms, which means it's not going to get any better. OTOH, while on the surface both use Cairo (as the previous poster mentions), that's like saying both render text - yes they do, but that's pretty much where the comparison stops. Moonlight is targeted for fast rendering, you get vectorial animations, you get hardware support whenever possible for graphics chips, because it really needs to be fast, it needs to support video with realtime render effects, 2D and 3D, etc. It might be that it's not yet up to par with the latest Silverlight version, but that doesn't mean it doesn't do what you need already. If you have the choice, go with new technology that's being actively worked on, not old stale tech.

Andreia Gaita