locked
Metro UI and Windows Phone RRS feed

  • Question

  • Hi ,

    I don't know if it is possible but I must ask.

    If I built a Metro UI application  upload it then in the store , will this application be compatible with Windows Phone ?

    Or we are talking for completely different things ?

    thank you

    Friday, November 9, 2012 1:48 PM

Answers

  • The application itself is not compatible, but most of the code is:

    In Visual Studio 2012 you can create so called 'Portable Class Libraries. If you want to make your application available on both, Windows 8 and Windows Phone 7/8, you should put your application logic (like getting stuff from an RSS feed or the logic for a game) inside a Portable Class Library. (You can create one via File/New Project/[select Visual C#, then Portable Class Library appears].)

    Inside a PCL you have access to all namespaces that are shared between the platforms you select. Windows Store Apps/Windows Phone 8 apps share a lot of namespaces, whereas Windows Store Apps/Windows Phone 7.5 shares less. The code relying on unshared APIs has to be written in one/two separate projects.

    This is what the solution of one of my apps looks like:

    While you can share most of your application logic between the platforms, you still have to write a separate main project for each platform you want to target (Windows Store Apps, Windows Phone 7.5 and 8, or Windows Phone 8 -- all 7.5 apps run on 8 too.)

    You also need to publish the apps separately, but as far as I know, your account/license works for both.

    cheers,

    ~theCake


    Life is unsure - always eat the dessert first!

    Friday, November 9, 2012 2:23 PM
  • For more information on what theCake suggests take a look at the //build sessions How to Leverage your Code across WP8 and Windows 8 and Designing awesome XAML apps in Visual Studio and Blend for Windows 8 and Windows Phone 8 .

    --Rob

    Friday, November 9, 2012 9:02 PM
    Moderator
  • An additional source of up to date information [confirming theCake approach] is given by: Windows Phone 8 and Windows 8 app development
    Saturday, November 10, 2012 8:20 AM

All replies

  • The application itself is not compatible, but most of the code is:

    In Visual Studio 2012 you can create so called 'Portable Class Libraries. If you want to make your application available on both, Windows 8 and Windows Phone 7/8, you should put your application logic (like getting stuff from an RSS feed or the logic for a game) inside a Portable Class Library. (You can create one via File/New Project/[select Visual C#, then Portable Class Library appears].)

    Inside a PCL you have access to all namespaces that are shared between the platforms you select. Windows Store Apps/Windows Phone 8 apps share a lot of namespaces, whereas Windows Store Apps/Windows Phone 7.5 shares less. The code relying on unshared APIs has to be written in one/two separate projects.

    This is what the solution of one of my apps looks like:

    While you can share most of your application logic between the platforms, you still have to write a separate main project for each platform you want to target (Windows Store Apps, Windows Phone 7.5 and 8, or Windows Phone 8 -- all 7.5 apps run on 8 too.)

    You also need to publish the apps separately, but as far as I know, your account/license works for both.

    cheers,

    ~theCake


    Life is unsure - always eat the dessert first!

    Friday, November 9, 2012 2:23 PM
  • For more information on what theCake suggests take a look at the //build sessions How to Leverage your Code across WP8 and Windows 8 and Designing awesome XAML apps in Visual Studio and Blend for Windows 8 and Windows Phone 8 .

    --Rob

    Friday, November 9, 2012 9:02 PM
    Moderator
  • An additional source of up to date information [confirming theCake approach] is given by: Windows Phone 8 and Windows 8 app development
    Saturday, November 10, 2012 8:20 AM
  • I will definitely have a look on those articles.

    Thank you all for your help.


    Sunday, November 11, 2012 3:16 PM