Target Silverlight and WPF using a common codebase

How do I build an application that targets both WPF and Silverlight?

This question comes up quite a bit as I talk to people about both WPF and Silverlight.  Whenever I am asked this question, I always respond by letting people know that v2 of the patterns & practices Composite Application Guidance for WPF (code name PRISM) is adding support for Silverlight 2.  Although, the overall purpose of the guidance is about building composite applications, v2 also has solid guidance on how to multi-target WPF & Silverlight using shared code where possible.  If you are interested in this scenario, then I would recommend downloading the latest drop and reading through the guidance.  You can follow the project from the codeplex site:

http://www.codeplex.com/CompositeWPF

As of this post, the most recent drop (7) is here:

http://www.codeplex.com/CompositeWPF/Release/ProjectReleases.aspx?ReleaseId=20206

You don’t have to download all the bits since the help file is available standalone.  If you want to go straight to the multi-targeting topics, then I recommend reading things in the following order:

Silverlight versus WPF

Multi-Targeting Design Concept

Mutli-Targeting Technical Concept

Project Linker: Synchronization Tool

Mutli-Targeting QuickStart

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s