.NET  

Building Cross-Platform Desktop Applications with Uno Platform and .NET 10

Introduction

Building desktop applications that run across multiple operating systems has traditionally required separate codebases, different UI frameworks, and platform-specific development expertise. Maintaining Windows, macOS, and Linux applications independently can increase development costs, complexity, and maintenance efforts.

Modern development teams are increasingly looking for ways to build applications once and deploy them everywhere. This is where the Uno Platform comes into the picture. Uno Platform enables developers to create cross-platform applications using C# and XAML while leveraging the power of .NET.

With .NET 10, developers gain access to performance improvements, enhanced tooling, and modern language features that make building scalable desktop applications even more efficient. By combining Uno Platform and .NET 10, teams can create native experiences across multiple platforms while maintaining a shared codebase.

In this article, you'll learn what Uno Platform is, why it's gaining popularity, how its architecture works, and how to build a cross-platform desktop application using Uno Platform and .NET 10.

What Is Uno Platform?

Uno Platform is an open-source framework that allows developers to build applications using C# and XAML and run them across multiple platforms.

Supported platforms include:

  • Windows

  • Linux

  • macOS

  • WebAssembly (Web)

  • Android

  • iOS

The primary advantage is code reuse.

Instead of creating separate applications for different operating systems, developers can maintain a single codebase while delivering native experiences.

Uno Platform is particularly attractive for .NET developers because it uses familiar technologies such as:

  • C#

  • XAML

  • .NET

  • MVVM architecture

This significantly reduces the learning curve for teams already working within the Microsoft ecosystem.

Why Choose Uno Platform?

Many cross-platform frameworks exist today, but Uno Platform offers several advantages for desktop development.

High Code Reusability

Most business logic, UI definitions, and services can be shared across platforms.

This reduces:

  • Development time

  • Maintenance costs

  • Testing effort

Native Performance

Applications run using native platform capabilities rather than relying entirely on web technologies.

This often results in better responsiveness and user experience.

Familiar Development Experience

Developers who have experience with:

  • WPF

  • UWP

  • WinUI

can quickly become productive with Uno Platform.

Broad Platform Coverage

A single application can target desktop, mobile, and web platforms simultaneously.

This flexibility is valuable for organizations seeking maximum reach.

Understanding the Uno Platform Architecture

A typical Uno Platform application follows a layered architecture.

Presentation Layer (XAML UI)
            ↓
View Models
            ↓
Business Logic
            ↓
Services and Data Access

This structure promotes separation of concerns and improves maintainability.

The majority of application code remains platform-independent.

Platform-specific implementations are only required when accessing native operating system features.

Creating a New Uno Platform Application

Uno provides templates that simplify project creation.

Create a new project using the .NET CLI:

dotnet new install Uno.ProjectTemplates.Dotnet

Create an application:

dotnet new unoapp -o UnoDesktopApp

The generated solution typically contains:

  • Shared project

  • Desktop targets

  • Mobile targets

  • WebAssembly target

This structure allows developers to share code across all supported platforms.

Understanding the Project Structure

A typical Uno Platform solution includes:

UnoDesktopApp
│
├── Presentation
├── Business Logic
├── Services
├── Models
└── Platform Projects

Each layer serves a specific purpose.

Models

Represent application data.

public class Product
{
    public int Id { get; set; }

    public string Name { get; set; } = string.Empty;

    public decimal Price { get; set; }
}

Services

Handle business operations and data access.

public class ProductService
{
    public List<Product> GetProducts()
    {
        return
        [
            new Product
            {
                Id = 1,
                Name = "Laptop",
                Price = 50000
            }
        ];
    }
}

View Models

Provide data to the user interface.

This approach aligns with the MVVM pattern commonly used in XAML-based applications.

Building a Simple User Interface

Uno Platform uses XAML for UI development.

Example:

<StackPanel Spacing="10">
    <TextBlock
        Text="Uno Platform Demo"
        FontSize="24" />

    <Button
        Content="Load Products" />
</StackPanel>

This XAML can run across supported platforms without modification.

The same UI definition can appear on:

  • Windows

  • Linux

  • macOS

  • Web browsers

This is one of Uno Platform's biggest strengths.

Connecting UI and Business Logic

Suppose we want to display products.

ViewModel:

public partial class MainViewModel
{
    private readonly ProductService _service;

    public List<Product> Products { get; }

    public MainViewModel()
    {
        _service = new ProductService();

        Products = _service.GetProducts();
    }
}

The ViewModel retrieves data from the service layer and exposes it to the UI.

This separation improves testability and maintainability.

Leveraging .NET 10 Features

Uno Platform benefits directly from improvements introduced in .NET 10.

Key advantages include:

Improved Performance

Applications benefit from runtime optimizations that improve startup times and execution speed.

Better Memory Management

Reduced memory usage helps desktop applications remain responsive even when handling larger datasets.

Enhanced Developer Productivity

Modern C# language features reduce boilerplate code and improve readability.

Example:

List<string> technologies =
[
    ".NET",
    "Uno Platform",
    "XAML"
];

These improvements help developers write cleaner and more maintainable applications.

Working with Dependency Injection

Dependency Injection is a common requirement for enterprise applications.

Register services:

builder.Services.AddSingleton<ProductService>();

Consume services:

public MainViewModel(ProductService service)
{
    _service = service;
}

Dependency Injection improves:

  • Testability

  • Flexibility

  • Maintainability

It is considered a best practice for modern .NET applications.

Common Use Cases

Uno Platform is suitable for a wide variety of applications.

Examples include:

  • Enterprise business applications

  • Inventory management systems

  • Internal company tools

  • Reporting dashboards

  • Educational software

  • Customer portals

  • Productivity applications

Organizations can reuse business logic across desktop, web, and mobile environments while maintaining a consistent user experience.

Best Practices

Follow MVVM Architecture

Keep UI logic separate from business logic.

This improves maintainability and testing.

Maximize Shared Code

Place reusable functionality in shared projects whenever possible.

This minimizes platform-specific implementations.

Use Dependency Injection

Avoid tightly coupled components.

Dependency Injection promotes flexibility and cleaner architecture.

Design Responsive Interfaces

Different platforms have varying screen sizes and layouts.

Build adaptable UIs that work across environments.

Test on Multiple Platforms

Even though code is shared, always validate behavior on:

  • Windows

  • Linux

  • macOS

This helps identify platform-specific issues early.

Comparison: Traditional Desktop Development vs Uno Platform

FeatureTraditional Desktop AppsUno Platform
Code ReuseLimitedHigh
Cross-Platform SupportSeparate ProjectsSingle Codebase
Maintenance EffortHigherLower
Development SpeedSlowerFaster
UI TechnologyPlatform SpecificShared XAML
Deployment TargetsLimitedMultiple Platforms

For teams targeting multiple operating systems, Uno Platform can significantly simplify development and maintenance.

Conclusion

Uno Platform has emerged as one of the most compelling options for building cross-platform desktop applications within the .NET ecosystem. By enabling developers to use C#, XAML, and familiar architectural patterns, it reduces the complexity traditionally associated with multi-platform development.

When combined with .NET 10, Uno Platform provides a modern foundation for building high-performance applications that run across Windows, Linux, macOS, web, and mobile platforms. The ability to share code, maintain a consistent user experience, and leverage existing .NET expertise makes it an attractive choice for organizations looking to maximize development efficiency.

For development teams seeking a practical approach to cross-platform desktop application development, Uno Platform and .NET 10 offer a powerful combination that balances productivity, maintainability, and platform reach.