Best practice sharing dev code between Metro and WPF app? RRS feed

  • Question

  • Any article, thoughts or comments would highly appreciated

    Tuesday, October 22, 2013 3:29 PM


All replies

  • Take a look at Resources for WPF or Silverlight developers and Maximize code reuse between Windows Phone 8 and Windows 8 . While the latter is specifically about sharing between Windows Phone and Windows Store apps the same techniques will work for sharing code between WPF and Windows Store apps.


    • Marked as answer by Southbranch Thursday, October 24, 2013 10:17 AM
    Tuesday, October 22, 2013 3:34 PM
  • Thanks, these articles are great.

    I am well familiar with using "clean C# classes” for e.g. sharing data and view models using the "Add as Link" technique

    But my real concern lies on the code bind (.cs) pages. A lot of the actual core logic for our current Metro app lies here even though some helper classes are used. And since this logic operates in the UI and XAML controls which  are unique for Metro and WPF respectively, I am wondering how we could use code sharing to include some code behind as well...?

    Wednesday, October 23, 2013 12:22 PM
  • Starting from an existing platform-specific code base harder, but you can try conditional compilation and partial classes as additional techniques to share code. 


    David http://blogs.msdn.com/b/dbrowne/

    Wednesday, October 23, 2013 3:41 PM
  • Thank you both
    Thursday, October 24, 2013 10:18 AM