Jacko
Jacko

Reputation: 13195

can I convert windows forms based desktop app to silverlight?

What is the simplest way of converting my .NET C# windows forms app to a silverlight app?

Thanks!

Upvotes: 1

Views: 2827

Answers (2)

Dan Abramov
Dan Abramov

Reputation: 268255

You will need to re-write all GUI completely. If you used any pattern separating business logic and data model from its presentation (MVC, MVP) it will be easier to port user interaction. If you used any database access layers or framework, they can most certainly be reused in Silverlight project. However, if your application logic is defined in form event handlers and data access is performed from within them, chances are high that you'll have to write a new application.

Also note that you can't use third-party libraries compiled for standard .NET Framework in Silverlight. You'll either need to recompile them, provided that you have the sources, or look for a specific Silverlight version of the binaries.

Standard .NET Framework libraries can easily be accessed, however there are some exceptions to the rule. For example, obviously, there is not System.Windows.Forms in Silverlight subset of .NET Framework.

To give you a better answer, I need more details: what kind of application are you considering to port, what libraries does it use, whether business logic is separated from presentation logic, etc.

Upvotes: 5

Gern Blanston
Gern Blanston

Reputation: 42660

Regarding the UI there is a Windows Forms to XAML Converter that may help a bit.

Upvotes: 1

Related Questions