Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Fun is... using the same code on three different platforms. XAMLFinance shows us how.

Today's project provides one example of how you can target three different platforms, Windows Phone 7, Web/Silverlight and Windows Desktop/WPF while sharing much of the same for all three, while taking advantages of the features each platform provides.

XAMLFinance – A Cross-platform WPF, Silverlight & WP7 Application

This article describes the development of XAML Finance, a cross-platform application which works on the desktop, using Windows Presentation Foundation (WPF), on the web, using Silverlight and on Windows Phone 7 (WP7). My aim in writing this article is to highlight how the XAML based technologies used for desktop, web and mobile allow you to share large quantities of code and cost-effectively distribute your application on a range of devices.


  • Overview
  • Introduction – Why cross-platform?
  • Cross-platform XAML development
  • Cross-platform, a Practical Approach
  • WPF / Silverlight Framework Differences
      • Broad differences
      • API level differences
  • Resolution Techniques
    • Conditional compilation (#if)
    • Partial classes
    • Design Patterns
    • Missing Framework Features
    • Missing Controls
    • Common pitfalls
    • The Unexpected
    • Adapting to each Platform
  • XAML Finance
    • Architecture
      • DataSource Library
    • XAML Finance Application
    • The MVVM pattern
      • Adapting for the web
      • Adapting for the desktop
      • Adapting for Windows Phone 7
  • Conclusions





What I also liked about the project was how it compared and contrasted the features available in the different forms of XAML.



And how these differences were dealt with;


Here's a snap of the WPF Solution;


This clip provides an example of how the code is shared between the different projects (Note the linked/shortcut icon on some of the files)


And all the above only lightly touches on the project's content.

If you're thinking about cross platform development, or just interested in a cool Silverlight, WPF or Windows Phone 7 app, this project might be just what you are looking for...

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • Fabulous FadzFabulous_​Fadz One does not simply walk into Mordor

    This is just so cool. I like the way that I didn't have to learn anything new for developing for windows phone. Same language, same environment, same xaml (pretty much), and I can take my apps desktop experience to another device. I'm completing my first win phone app and love the way I can just re-use code and mark-up between the desktop version of the app. 

  • JamestJamest

    How bout on the IPad or IPhone....

  • Fabulous FadzFabulous_​Fadz One does not simply walk into Mordor

    @Jamest: Apple will need to support XAML for that to happen. I don't use Mono so don't know what became of the moonlight project, but if it is alive, in theory you could use some of the XAML to build apps for iOS.

    In any case, using Mono, you can still use your .NET code for other platforms so there is still some level of re-use. 

    What this post highlights is the almost seamless experience of building on the Windows ecosystem. Which is great.

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.