Uno News

Talkin’ ‘bout my generation: How the Uno Platform generates code, part 1 — Under The hood

In previous articles, we’ve covered how the Uno Platform takes a visual tree defined in the XAML markup language and creates it on iOS, Android, and WebAssembly. In this article I want to dive into a key intermediate step: how the XAML is parsed and mapped to generated C# code. In part 2, we will look at a few other ways in which Uno leverages code generation to make the wheels turn.

Pushing the right buttons : How Uno implements views

In this article I want to focus on how to implement the suite of views in the UWP framework for iOS, Android, and in the browser. I present the simplest interactive application imaginable, one step above ‘Hello World’…

Migrating the Silverlight Toolkit TreeView control to UWP and the Uno Platform

You can find the code of the TreeView for this article in the Uno.UI.Toolkit.SLrepository, in which we will add new controls and accept contributions for controls as they are made available. In this blog post series, we’re going to cover the migration of the code for the Silverlight Toolkit TreeView control TreeView control to UWP and the Uno Platform, a control widely used in many lines of business applications still in use today. This includes parts of the features that may or may not work initially, as well as modifications that will have to be made in the Uno Platform to conform to UWP if required. While the Uno Platform includes all the APIs of the Spring Creators Update (17134), many of these APIs are not implemented yet and there may be some that are used by the Silverlight TreeView control. Also, the point of this exercise is to walk through a migration process from a Silverlight code base, as there is already an existing TreeView control API in UWP. As of the writing of this article, the UWP TreeView is not implemented in the Uno Platform and migrating this Silverlight control is not an option, as the APIs are significantly different and not directly compatible. Importing the Silverlight TreeView control source To migrate a control

Under the Hood: an Introduction to Uno Platform

By now you may have heard about Uno. In this post series, I want to lay bare Uno’s technical innards. We’ll look at the critical code that powers the platform, and chart the ups and downs of building a UI platform. First, let’s get the lay of the land. The Uno Stack Uno is a cross-platform UI framework. You write an app in C# and UWP-flavoured XAML markup. It runs on Windows because it’s a UWP app. With Uno, it runs on Android, iOS, and (for the brave) in the browser via WebAssembly as well. I drew a neat sketch of the tech stack. On iOS and Android, Uno uses Xamarin to access the platform’s native framework. In the web version, it’s running directly on top of Mono, which in turn is running on top of WebAssembly. So what’s Uno doing? There are a few things that need to be done to get your app running: -At compile time, Uno parses XAML files into C# code, creating the information needed to build the app’s visual tree; -It implements a complete DataBinding engine, optimized for static type-checking where possible; -It implements the views and controls in the UWP framework, using each platform’s native UI framework as a basis. Each of those items warrants

Uno Platform support for the Windows Community Toolkit

Recent updates to the Uno Platform have allowed for the Windows Community Toolkit to run on iOS, Android and the Web through WebAssembly. You can try it live in your browser HERE. Support for the Windows toolkit is an important part of the UWP development experience, as it provides a some missing controls and helpers from the UWP base API, such as the WrapPanel, Headered TextBlock, DockPanel, etc… We’re providing an experimental Nuget package named Uno.WindowsCommunityToolkit, to allow for developers to use the same controls on all platforms. In the same direction we took for the other libraries (MVVMLight, ReactiveUI, WindowsStateTriggers, Prism, …), the Uno-compatible packages are forks of the original repositories, in order to demonstrate the viability of Uno as a target for those libraries. Ultimately, the Uno Platform developers will make pull requests back to the original repositories, once it makes sense for the original maintainers and that the sources will no longer need significant structural changes.     Building support for the Windows Community Toolkit for Uno To add initial support for the Windows Community Toolkit, some new features had to be added to the Uno Platform code base, such as suppport for x:Bind, support for code-behind events in DataTemplate, and other small updates to have a first list of available controls. WCT