Ny way to write a WinRt (Metro) app that will also work on Windows 7 and Vista

microsoft-metrowindows 7windows 8windows-runtime

We can’t just leave our customers that are not able to upgrade to windows 8 for a long time in the larch. However there is demand for a “tablet”/”touch” version of our app.

So how can we support both touch with Metro on Windows 8 and our current customers from a single code base?

When WPF come out, after a lot of “Pushing” Microsoft saw since and make it work on Windows XP – has anything like this been talked about for WinRT.

(I am not expecting any solution to work on XP, as XP support is being wound down.)

See Also: Can the ARM version of Windows 8 only run Metro (WinRt) style apps?

Best Answer

The best answer is that you do not want the same application to run on Windows 7 and Windows 8 Metro style. The UI that works best for mouse and keyboards (windows 7) will not work well for a touch-first presentation and visa versa. It is important to re-imagine the UI for the two different worlds.

That said, you have 2 options if you want to share a lot of the code: 1) Write it largely in JavaScript/HTML5. This will let you re-use many of the assets (especially the business logic parts). 2) Write it in (desktop) Silverlight. The Silverlight XAML is closest to Windows XAML. WPF is further away and will require more re-work later.

In either case, you should look at and follow the principles used when writing cross-platform code. Understand the platform dependencies and isolate them behind indirection boundaries. You want to localize all of the code that will have to change. For instance, you don't want calls to the .Net System.IO.File APIs which you know will have to change to Windows.System.Storage calls being scattered throughout your code. Instead, you want it localized in one function that can be modified later.

Related Topic