At the MIX '09 conference this year, I presented a talk, "Sharing Skills and Code with Silverlight & WPF
". Here's the sample application and control source code that was used throughout the talk.
It demonstrates simple concepts for linking files from a Silverlight to WPF project, using partial classes and partial methods, preprocessor directives, and other tools to create projects that work throughout the Microsoft Client Platform.
Silverlight sample application
WPF sample application -100% the same source
Download the samples
- Zip, 596 KB
The Zip contains the following work:
- Toolbar control for Silverlight and WPF
- Sample application for the Toolbox
- Continuum application - same XAML and CS shared between a Silverlight and WPF application that uses the DataGrid, charting controls, and our custom Toolbar control
- Value-add code, Awesome.cs, that adds some simple functionality to the WPF application only
Hope this helps.