Desktop + Cross-Platform/Mobile - Xamarin? .NET Core 3.1? Other? RRS feed

  • Question

  • I've been writing Java and out of the C#/.NET ecosystem for over a decade, so please pardon my ignorance as I completely missed the whole XAML/WPF/UWP era. I've been trying my best to get up to speed on current technology and best practices, but it's so different than the early days of WinForms.

    I inherited two old C# applications that need to be completely re-written (way beyond refactoring). One is a desktop WPF application that is basically a graphical editor for an XML file (persists the model). The other app is a Win8.1 Metro store app that runs on a Windows Surface Pro tablet that basically renders the XML file and lets the user add data to the model/XML file. Several custom User Controls are functionally common to both apps, but with duplicate and incompatible code (WPF vs WinRT).

    My goals for the re-write are:

    - Use MVVM to allow unit testing of as much as possible and clean up the design.

    - Have the two apps share as much code as possible. 

    - The mobile app needs to run on Win10, iOS, and Android with as much shared code as possible

    At first, I thought .NET 5 was going to be my savior with all the talk of it being "cross-platform". I thought it was going to support writing a WPF app and having it magically run on iOS and Android as-is, but I guess I misunderstood the press release/etc. I was thinking that I could re-write both apps using .NET Core 3.1 and when .NET 5 comes out, my apps would be cross-platform. It appears that is not the case...

    It appears that I need to re-write the mobile app using Xamarin.Forms. The desktop app can still be WPF (or must it be UWP to share UI controls?). The shared code would be written in .NET Core 3.1/5, or does it require .NET Standard 2.x? 

    I'm so confused. I've been reading/googling for hours and hours and still don't understand what my path forward should be. Can anyone clear up how to create a desktop app and a mobile cross-platform app (Win10, iOS, and Android) that can share code in 2020?

    Tuesday, December 17, 2019 3:05 PM

All replies

  • Wednesday, December 18, 2019 12:50 AM
  • Hi Garry,

    Welcome to MSDN forum.

    According to your description, since our forum is discussing about the usage of tools and editors in Visual Studio and your issue is more related to Xamarin, I recommend you could redirect to Stack Overflow tagged xamarin or .net core 3.1 then start a new thread there to seek for a more professional and satisfied help.

    Sorry for this inconvenience and thanks for your understanding.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, December 18, 2019 7:51 AM