News

Build pixel-perfect Microsoft Surface Duo apps with Uno Platform

This post originally appeared on the Microsoft Developers blog. For those of you who are Surface developers, there has never been a better time to get started. The technology just gets better and better, and the tools available to you to create amazing Surface apps are advancing right along with the tech. The Surface Duo team has demonstrated how you can build dual-screen apps using Java and Kotlin, Xamarin and C#, Flutter, React Native, Web, and games with Unity. Today’s blog post shows how UWP and WinUI developers can target the Surface Duo using Uno Platform. For those new to Uno Platform, it allows for creation of pixel-perfect, single-source C# and XAML apps which run natively on Windows, iOS, Android, macOS, Linux, and Web via WebAssembly. Uno Platform is Open Source (Apache 2.0) and available on GitHub. In this blog post you will learn how to: Use Uno Platform for your next Surface Duo application Test your application using the Surface Duo emulator Utilize Surface Duo’s unique Hinge Find code samples and resources for further Surface Duo development with Uno Platform Architecture of Uno Platform and Surface Duo Solution The Uno Platform philosophy is to replicate the WinUI and Windows APIs

Pluralsight course on Uno Platform now available! Free access for 10 days.

We are pleased to announce that Pluralsight, one of the leading online learning platforms, is now offering a course on Uno Platform. Best of all you can enjoy it with a free 10-day trial from Pluralsight. (Update – Aug 10). Please note that you may be required to create a paid Pluralsight account in order to see the course, with an option to cancel your subscription within 10 days. This is not ideal and we are reaching out to Pluralsight to see if the messaging on the site can be changed to reflect how to actually take the course for free for 10 days.  Taught by Thomas Claudius Huber, a Microsoft MVP and well-known author, this is a great way to expand your knowledge after you’ve gotten your first steps via our official Getting Started guide. Course description: To build a .NET app with WinUI that runs not only on Windows, but also on Android, iOS, macOS, Linux, and the web, you can use Uno Platform. In this course, Uno Platform Fundamentals, you’ll learn how to build a multi-platform app with Uno Platform and WinUI. First, you’ll explore what the Uno Platform is and you will create your first Uno

Uno Platform SQLite for WebAssembly support on .NET 5 and .NET 6

WebAssembly Support for SQLite and Erik Sink’s SQLitePCL.raw has been present in Uno Platform for quite some time now, when running under the mono runtime but .NET 5+ support was missing. We’re pleased to announce that support has now been added in our SQLite provider for WebAssembly starting from 3.1.1, allowing to build with the latest and greatest features available, alongside with Entity Framework Core 6 previews and the Frank Krueger‘s awesome sqlite-net-pcl library. We’ve updated our online sample repository for you to try SQLite and EntityFramework Core directly in your browser: https://sqliteefcore-wasm.platform.uno   Getting started using SQLite in your browser You can find an up-to-date documentation for this walkthrough here, the full example for this tutorial here, and Entity Framework Core sample here. First, you’ll need to setup your environment using our getting started steps. Once you’re done, you can create a new application using our visual studio extension or dotnet new templates. You’ll then need to add new dependencies in your application as follows: <PackageReference Include=”sqlite-net-pcl” Version=”1.7.335″ /> <PackageReference Include=”Uno.SQLitePCLRaw.provider.wasm” Version=”3.1.1″ /> <!– Required when using sqlite-net-pcl which otherwise overrides the WebAssembly compatible version of the SQLitePCL.raw provider. –> <PackageReference Include=”SQLitePCLRaw.bundle_green” Version=”2.0.5-pre20210521085756″ IncludeAssets=”none” />   Once done, in

Uno Platform 3.9: .NET 6 Mobile, VS 2022, WinUI, plus XAML trimming for 50% Wasm AOT size reduction

The newest release brings support for .NET 6 (for iOS, Android, mac Catalyst and macOS), support for Visual Studio 2022 templates, WinAppSDK 0.8.1, Focus management updates, a XAML Trimming feature to reduce the size of WebAssembly apps by nearly 50% as well as many other improvements and bug fixes. WinUI Everywhere In order to follow through on our vision to make WinUI-built applications everywhere, we remain in lockstep with all advancements in Windows developer ecosystem. As Microsoft announced, WinUI 3 now ships as part of the new WinAppSDK (formerly known as Project Reunion). WinAppSDK 0.8.1 has been released and our 3.9 release supports it.   .NET 6 support – iOS, Android, macOS Catalyst and macOS Adding support for .NET 6 mobile targets required a significant effort in terms of packaging to ensure that both current Xamarin (iOS/Android/macOS) targets are supported, as well as new .NET 6 based targets. This new support is available for both Uno.UI and Uno.WinUI packages, ensuring a smooth transition for existing projects. .NET 6 Mobile for Uno Platform support comes with iOS, Android, macOS (AppKit) and Catalyst targets. Mac Catalyst is the newest platform addition, giving the ability for UIKit-based apps to run on macOS with

NuGet Package Explorer is now a Web App powered by Uno Platform

A few months ago, we looked for a challenge. That tweet generated a lot of responses. The most vocal of them was – make NuGet Package Explorer (NPE) run on the Web. To date, NPE has been downloaded over 250,000 times, so this was exactly the challenge we looked forward to. The stakes were high but if successful, we would have contributed something of real value to software developers. We worked with Claire Novotny, the maintainer of original Windows NPE built with WPF on .NET 6, and we present to you: https://NuGet.info The new solution is a WinUI, Windows Community Toolkit and Uno Platform powered solution which runs on the Web, via Uno’s support for WebAssembly and .NET 6 for WebAssembly. As Uno Platform has built-in Progressive Web App (PWA) support, you can also install NPE as a PWA, and soon all other target platforms Uno Platform supports, depending on your needs and desires. Next Steps The NPE project has been a part of .NET Foundation and our contribution – NPE on the Web – will continue to be maintained under .NET Foundation mandate, and under MIT open-source license. This version of NPE implementation is just the first iteration– extending

Uno Platform, Visual Studio 2022 and Hot Reload

Visual Studio 2022 Preview 1 has just been released and we are already working to make sure Uno Platform is along for the ride. Alongside the significantly improved solution load time experience, the C# Hot Reload feature has also been improved, and it’s working great with our Skia/GTK heads (other platforms will come soon)! Take a look:   You can see in this video code-behind hot reload, XAML and x:Bind Hot Reload! This feature is now available since Uno Platform uses XAML to C# source generation, and the new Visual Studio Hot Reload feature re-generates the C# code on code changes.   The Visual Studio Extension is not yet available for creating new projects, as it needs some 64-Bits enhancements, yet you can use our dotnet new templates instead, or use the trusted Visual Studio 2019.   About Uno Platform For those new to Uno Platform – it allows for creation of pixel-perfect, single-source C# and XAML apps which run natively on Windows, iOS, Android, macOS, Linux and Web via WebAssembly. Uno Platform is free and Open Source (Apache 2.0) and available on GitHub.   Next Steps If you are new to Uno Platform, the best way to get started is

Uno Platform 3.8 – New WinUI Calendar, Grid controls, 2x performance, new Linux scenario and more

The new 3.8 release ports additional WinUI controls and layouts, such as the often-requested CalendarDatePicker and CalendarView controls, to all Uno-supported platforms getting us one huge step closer to the #WinUIEverywhere vision. Also, the new release brings up to 2x performance improvements in some scenarios, realized from the new Grid implementation as well as DependencyObject and UI Elements creation improvements. We also introduced new AOT and features for WebAssembly, built on top of recently released Microsoft work on .NET. On the Linux front we enabled new scenarios so you can target embedded systems using the FrameBuffer as well. In addition to new UI and Performance features and improvements, the team has closed 100+ issues. Closing issues timely is crucial in further fueling large projects enabling customers like Kahua to port a massive line of business applications from desktop to Web. We are particularly proud of the fact that with every release we close more issues than have been opened in the previous period; it shows a healthy open-source project. A huge THANK YOU goes to all our contributors. Now, let us unpack the 3.8 release in more detail. CalendarDatePicker and CalendarView Shout out to @carldebilly, @dr1rrb, @agneszitte-nventive, @kazo0, @sakshi173 The

An Introduction to UI Testing for Uno Platform Applications

Introduction This step-by-step tutorial will take you through setting up your first unit test with Visual Studio and Uno Platform. If you are new to Uno Platform, it allows for creation of pixel-perfect, single-source C# and XAML apps which run natively on Windows, iOS, Android, macOS, Linux and Web via WebAssembly. Uno Platform is free and Open Source (Apache 2.0) and available on GitHub. Why Unit Test? Performing unit tests is a good practice for developers. Running unit tests is important for good quality and maintainable code. A unit test helps find errors in your code in a very easy manner. Unit testing helps reduce the cost of bug fixes. Prerequisites Visual Studio with Uno Platform Create a New Uno Project Open Visual Studio and click on Create new project. Search for the Uno templates, select the Cross-Platform App (Uno Platform) then click Next. Name your app. You probably want your project and solution to use the same name as your app. Put it on your preferred location for projects and click “Create”. Uno.UITest for Uno Platform The testing is available through: Selenium for WebAssembly apps, using Chrome Xamarin.UITest and AppCenter for iOS and Android apps. Note: The following target

New Uno Platform Docs Launched

Today we rolled out our new documentation site – https://docs.platform.uno – with improved readability, full-text search, and a tutorial section with a number of additional how-to articles. This has been consistently a key issue in feedback from the Uno community and with these steps we are starting to deliver improvements to our docs.   No documentation site is ever finished. We will continue to improve our documentation and invite you to be a part of this process. Every page is editable, and you can make your contribution by clicking “Improve this Doc” button. If there are pages, you’d like us to add, and which you can populate with your i.e. “how-to” articles, just file a Documentation Request on our GitHub. Or if you need help in beginning to contribute, feel free to reach out to us at info@platform.uno