Our Discord community is buzzing. Come and join us!

Tutorial: Expand the Reach of your Existing C# WinUI 3 App

If you’ve created a simple photo viewer app using WinUI 3 and want to reach more users without rewriting your app, this new tutorial recently added to Microsoft Docs is for you.

The tutorial demonstrates how to leverage Uno Platform to expand the reach of your existing C# WinUI 3 application across native mobile, web, and desktop platforms while reusing the business logic and UI layer. By making minimal changes to your existing app, you can create a pixel-perfect copy of the app that runs on multiple platforms.

Building a Simple Photo Viewer

To get started, you’ll need Visual Studio 2022 version 17.4 or later, along with the necessary tools and workloads for Windows App SDK, web development, iOS/Android development, and desktop development. Once your environment is set up, you’ll install the Uno Platform solution templates and create a new Uno Platform application.

The tutorial provides step-by-step instructions for creating a multi-platform application using Uno Platform. It explains how to copy the code from your existing WinUI 3 project into the multi-platform project, enabling code reuse. You’ll also learn how to add image assets to the project and prepare your app for the multi-platform experience.

Uno Platform’s XAML flavor ensures that the view works seamlessly across all supported platforms. By copying the contents of your existing Window element into the Page element of the Uno Platform project, you can achieve platform consistency with minimal effort.

Overall, this tutorial empowers you to target multiple platforms with your existing WinUI 3 app, expanding your app’s reach and user base. With the Uno Platform, you can leverage your existing codebase and create a consistent user experience across mobile, web, and desktop platforms. So why limit your app to a single platform when you can easily extend it to a broader audience?

About Uno Platform

For those new to the Uno Platform, it allows for creating pixel-perfect, single-source C# and XAML apps that run natively on Windows, iOS, Android, macOS, Linux and Web via WebAssembly. In addition, it offers Figma integration for design-development handoff and a set of extensions to bootstrap your projects. Uno Platform is free, open-source (Apache 2.0), and available on GitHub.

Next Steps

To upgrade to the latest release of Uno Platform, please update your packages to 4.9 via your Visual Studio NuGet package manager! If you are new to Uno Platform, following our official getting started guide is the best way to get started. (5 min to complete)


Share this post:

Uno Platform 5.2 LIVE Webinar – Today at 3 PM EST – Watch