We have pretty much C# 2.0 code that heavily relies on System.Drawing namespace. Also there is some WinGDI dependencies (via interop).
How would you recommend to tackle the problem of making functionally equivalent Silverlight version of the code? We want to reuse code as much as possible because we want to continue develop both versions of the code.
Maybe there is some articles/books you could recommend?
UPDATE: The code is a non-visual component. Not an application. There is no 3rd party dependencies.
I have a great experience in creating wpf/silverlight versions of software that used to be built using winforms. It's sad, but in your case, when you use a lot of interop and System.Drawing things, it's practically impossible to do such a thing.
Of cource, you can always try (and really you always have to) to separate your business logic from interface, but in such situation (I hope a'm wrong!), your interface have to be completely redesigned, because of differences in architecture of winforms and wpf/silverlight.
In my experience, this problem solved in this way: all old winforms components stayed just the same, but all new features were built using wpf with help of injection of wpf controls into winforms application.
Yes, sometimes it's weird, but it's really more productive than just waste all your old code and spend huge amount of time and money into new, that does just the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With