How easy is it to port a Windows Phone 7 application to Metro on a Windows 8 tablet?

后端 未结 6 938
生来不讨喜
生来不讨喜 2021-02-14 11:10

I know that Metro on both platforms shares a common “look and feel” and that WinRt makes use of XAMLand C# (or VB.NET) like Silverlight does on Windows Phone 7.

Howev

6条回答
  •  名媛妹妹
    2021-02-14 11:47

    If you are familiar with the MVVM architecture, you can think about it this way:

    • Both apps can share the same view-model (especially if you made the design choice of not letting the view model know anything about the view)
    • You create a OS-specific view, the one you already have for Windows Phone and a new one for Windows 8 and bind to the same view model.
    • You load the views accordingly, using your choice of compiler directives, app configuration, separated shells/bootstrappers, etc.
    • You may need to introduce some compiler directives to your view-model and other non-view libraries if you use anything which is platform specific.

    Following these directives you could have a very platform specific user experience, yet a very unified code base.

    I hope this adds valuable information for you in addition to the great answers you already got from the other guys.

提交回复
热议问题