News

Uno Platform 5.0: C# Is Now All You Need

Uno Platform 5.0 shipped this week with the ability to create entire cross-platform applications -- including markup -- from a single codebase written in one language, C#.

The open source Uno Platform claims to be the only offering that enables development of single-codebase applications for Windows, WebAssembly, iOS, macOS, Android and Linux, targeting all OSes and browsers. The Uno team has also teamed up with Redmond on various projects and has sometimes implemented new tech before Microsoft itself.

Uno Platform
[Click on image for larger view.] Uno Platform (source: Uno Platform).

Version 5.0 shipped yesterday (Nov. 2), leveraging C# Markup for both front-end and back-end development. It lets developers use C# code for designing layouts instead of Microsoft's default markup language, XAML (Extensible Application Markup Language).

In announcing C# Markup for cross-platform .NET apps in v5.0, Uno Platform said, "You asked; we delivered. A massive bit of feedback from the community has been the need to learn multiple languages to build an Uno Platform application. Now, you can build your entire application using a single language with C# Markup!"

Microsoft C# Markup documentation shows that it's primarily associated with the company's .NET Multi-platform App UI (.NET MAUI) project. As C# Markup is not a new language, there are no extra types to know to build applications using it, said Uno Platform, which provided the graphic below to illustrate how similar is the markup code from C# Markup and XAML used to create the same UI elements:

[Click on image for larger view.] C# Markup vs. XAML (source: Uno Platform).

A related new feature in v5.0 is what the team called the first and only Figma-to-C# Markup export tool, presented as a preview in the new release. "In addition to developing UI by hand using C# Markup, you can now generate C# Markup directly from Figma designs," the team said. "Our partners report a 5x productivity increase using this feature alone compared to coding by hand."

Other highlights of the new release as presented by Uno Platform include:

  • New and improved Hot Reload. Uno Platform said this functionality -- which has proven to be problematic for Microsoft -- works with XAML, C# or C# Markup in Visual Studio or Visual Studio Code on PC, Mac or Linux. The team said Hot Reload in Uno Platform 5.0 works in less than a second after the startup of an app, while also letting developers:
    • Use all the newest supported C# code changes from .NET 8
    • Get the state of controls preserved
    • Update code-behind, add new event handlers, update styles, resources, bindings, x:Bind expressions, DataTempate, Resource Dictionaries and so on
  • Improved MVUX (Model-View-Update eXtended) The team described this as "our implementation of the MVU pattern that allows you to get all the benefits of Reactive/Immutable/Declarative/Asynchronous state management while being fully testable and Hot Reload friendly."
  • Two New Sample Apps with complete self-guided workshops to help developers learn how to build cross-platform applications using Uno Platform, reducing their ramp-up time. They are Simple Calc (beginner workshop) and Tube Player (intermediate workshop).

While the above constitute the major new features of the release, Uno Platform said the approximately 500 fixes and improvements across the offering also include:

  • MP4 camera capture for iOS
  • Improved composition support for Skia targets
  • Many performance improvements for all platforms
  • Improved DPI scaling and theming support for GTK
  • Many Shapes clipping and general measure/arrange improvements
  • Compass and MemoryManager support for WebAssembly

More information on all of the above can be found in the project's GitHub repo.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • See Prompts Microsoft Engineers Use for Bleeding-Edge Multimodal RAG AI Research

    Vision-centric queries show how front-line experts are prompting LLMs these days.

  • AI Explains Expressions in Update to Java on VS Code

    "The Spring Tools now show code lenses above these expressions that allow you to quickly let GitHub Copilot explain those statements for you."

  • Microsoft Eases Integration with Semantic Kernel AI SDK

    The basic idea is to provide unified API abstractions, especially for idiomatic C# code, to help platform developers and others work with any provider with standard implementations for caching, telemetry, tool calling and other common tasks.

  • Final .NET 9 Preview Ships with Go-Live License

    Visual Studio developers can now download the SDK for .NET 9 Release Candidate 2 with a go-live license, meaning devs get Microsoft support for production applications even before the framework reaches general availability next month.

Subscribe on YouTube