Cross desktop application development sample using Xamarin.Forms

Cross desktop application development sample using Xamarin.Forms

2020, Oct 21    

For an article in Programmez, in french, that will be published in late in October 2020, I did a sample walk through on how to develop a simple application using Xamarin.Forms targeting both Windows 10/8 and MacOS.

What it looks like

This is a basic notepad called CrossPad that can be found on my Github. The idea was to leverage Xamarin capabilities to develop an application with a minimum of custom code for one platform.

Of course this evolves rapidly, and in the coming months Microsoft will publish the first preview version of Maui, the evolution of Xamarin.Forms to simplify cross platform development.

Here are some print screens of this application

  • WPF version

CSV sample

  • UWP (Universel Windows Platform) version

CSV sample

  • MacOS version

CSV sample

You can browse the code and use it as a baseline for your projects.

Stay tuned

As I have said above, things are moving quiclky, and Microsoft has just released a couple of things to extend cross platform development:

The Microsoft Edge WebView2 control enables you to embed web technologies (HTML, CSS, and JavaScript) in your native applications. The WebView2 control uses Microsoft Edge (Chromium) as the rendering engine to display the web content in native applications. With WebView2, you may embed web code in different parts of your native application, or build the entire native application within a single WebView

The Windows UI Library (WinUI) is a native user experience (UX) framework for both Windows Desktop and UWP applications. By incorporating the Fluent Design System into all experiences, controls, and styles, WinUI provides consistent, intuitive, and accessible experiences using the latest user interface (UI) patterns. With support for both Desktop and UWP apps, you can build with WinUI from the ground up, or gradually migrate your existing MFC, WinForms, or WPF apps using familiar languages such as C++, C#, Visual Basic, and Javascript

Although it is not yet for cross platform, but who knows …