Mobile

Beautify your Apps with Lottie for Uno Platform

While having animations in our apps is always a treat, implementing them without a hiccup can sometimes be challenging. Thankfully, Lottie enables us to very easily include beautiful and performant vector animations in our cross-platform apps. Even better yet, since Lottie animations are exported as JSON files, file sizes remain small and your animations can easily be resized, looped, and even interacted with without losing quality. Let us go ahead and see how we can implement Lottie animations into our Uno Platform applications, whether you’re targeting iOS, Android, macOS, Linux, or even WebAssembly! Prerequisites and Packages On all Uno Platform targets, you’ll need the following package: Uno.WinUI.Lottie (for the LottieVisualSource). You can find the package by: right-clicking on the project > Manage NuGet Packages > Search Uno.WinUI.Lottie On Windows/WinAppSDK, the support for Lottie is still pending. Implementing Lottie for Uno Platform Feel free to follow along in your preferred IDE or test out Lottie implementation in Uno Playground. Try it out in Uno Playground Step 1 First thing we’ll want to do is add our XML namespace to the mainpage. Step 2 – Update the source On WASM, iOS, and macOS, you can put the Lottie .json files directly in a

XAML Fundamentals for Web and Mobile: Three-level List/Detail Pattern

Opportunity instead of obsoletion Users increasingly expect an intuitive way to drill into your data source and inspect the contents of an individual element. It’s often necessary to leverage a pattern that consistently connects the intentioned person behind the screen to the result they expect. Likewise, a nontrivial part of modernizing your .NET app not only lies in rethinking it for the web but in challenging past assumptions about the user. In a multi-platform world, significant opportunities exist to bolster engagement and familiarity with the information they seek. That’s why developers using WinUI XAML on Uno Platform are well-positioned to enhance their app’s UI to enable faster parsing through a data source, more intuitive location of data items, and a responsive layout that scales to the current device. Understanding the pattern Users increasingly expect an intuitive way to drill into your data source and inspect the contents of an individual element. It’s often necessary to leverage a pattern that consistently connects the intentioned person behind the screen to the result they expect. Likewise, a nontrivial part of modernizing your .NET app not only lies in rethinking it for the web but in challenging past assumptions about the user. In a

Implementing Chromecast with Uno Platform Applications

If you’re building a video or audio application with Uno Platform, you can easily include Chromecast Support. In this article, using a simple XAML design with TextBox, Button, TextBlock and Listview we walk through the steps to cast a simple app to communicate with. Before we get started, there are a few initial steps to be taken. Prerequisits For this tutorial, we are using Uno Platform on a Mac, but you can follow the instructions on Windows as well. If you are new to Uno Platform please setup Uno Platform on your machine first: Windows https://platform.uno/docs/articles/get-started-vs.html VS Code https://platform.uno/docs/articles/get-started-vscode.html Mac https://platform.uno/docs/articles/get-started-vsmac.html To create Uno Platform projects using the command line, you also need to install the templates by following these instructions here: dotnet new templates for Uno Platform. Chromecast Chromecast allows streaming videos in the background with remote devices (TV, Google mini). Before a Cast session can begin, both the sender device (for example, a mobile phone or tablet) and the receiver device (for example, a Chromecast plugged into a TV) must be connected to the same Wi-Fi network. For more info, please refer to the below URL. GoogleCast Basics Limitation: Chromecast does not support local media files. Create New

Adding Uno.Extensions to a WinUI Multi-Platform Uno Application

This post will be the first in a series of posts talking about Uno.Extensions, a set of libraries that the Uno team have been working on to simplify common application scenarios and make it quicker and easier to build robust multi-platform applications using Uno Platform. Follow Along with the Source Code Before we get started with the Uno.Extensions, we’re going to go ahead and create a new application to work with. However, I first want to unpick a topic that can be quite confusing for developers who aren’t familiar with the UWP/WinUI + Xamarin/Maui ecosystem, which is the different flavors of the Uno Platform. Until recently, there was one flavor of Uno, which was based on UWP and used the UWP/WinRT APIs as the basis for building applications for Xamarin.Android and Xamarin.iOS. However, Microsoft is making some substantial changes to the mobile ecosystem as part of the .NET Maui project. These include switching to SDK style projects, combining the various platforms into a single project and of course converging on .NET 6. Essentially this is a breaking change which will require most application code and libraries to be adapted (unless they were .netstandard 2.0 only). This led to the introduction of Uno

Tutorial – Building a Kanban Style Todo App (code included)

… What better way to start learning a new technology than with a tutorial that includes all the sample code? When you finish, or fork, the tutorial you will end up with an application like this: Steven Giesel recently published a 5-part series documenting his experience building a Kanban-style Todo-app using Uno Platform for the first time. Follow along as he takes you through Uno Platform set-up, his thoughts on the platform, and finally a hands-on demonstration of creating a Todo app Kanban-style that runs in your browser, desktop, or mobile! For those of you who are new to Uno Platform, or looking to start using the platform, it allows for building Mobile, Desktop, and WebAssembly apps with C# and XAML and there has never been a better time to get started. We’ve spent a significant portion of our recent releases (Uno Platform 4.0 and 4.1)  improving performance and features, and the tools now available to you to create amazing apps are paving new opportunities Part One – Introduction and Environment set up As a first-time user, Steven gets down to the basics of Uno Platform and covers the differences between the platform and .NET MAUI. With a basic understanding of the

Uno Platform 4.1 Update for .NET 6 Mobile Preview 14

The .NET team has been steadily releasing a set of updates to the .NET 6 Mobile previews. Last week’s update was Preview 14, which came at just about the same time as Uno Platform 4.1 release. Following .NET 6 mobile Preview 14, we’re publishing the Uno Platform 4.1.9 service update.  This update includes a new set of binary breaking changes added in .NET 6 Mobile Preview 14, which requires the use of Visual Studio 17.2 Preview 2. If you update to Visual Studio 17.2 Preview 2, you will need to be on Uno Platform 4.1.9 or later.  To use this new preview in Uno Platform projects, you’ll need a few steps:  Update to the latest uno-check preview dotnet tool update -g uno.check –version 1.2.0-dev.10 and then run uno-check –pre Update your NuGet packages to Uno.UI.* 4.1.9 or create a new project from the templates If you’re building on a mac, either directly or through VS for Windows, you’ll need to run uno-check on the mac as well. Make sure that your Visual Studio 2022 Uno Platform extensions are updated to 4.1.9 (it should be automatically updated) Note that if you intend to build for iOS, Xcode 13.3 is required and that this version

Uno Platform 4.1 – 30% Perf Boost, Android 12, .NET 6 Mobile Preview 13 and more

It has been just over 3 months since our 4.0 release, and we’ve used that time to focus on performance as well as bringing the latest .NET 6 innovation to Uno Platform. By simply updating your application to the newest bits you will notice a significant boost to your app performance. This release packs over 200 new feature requests, bugs, and issues you raised. We welcomed a few great contributions from our community, which is now over 210 contributors strong! Thanks for all you bring to Uno Platform. Let’s unpack the 4.1 release. Performance updates For this release, we’ve made numerous changes to a wide range of parts from the Uno Platform, such as Style resolution, layout and measure pass performance, memory consumption and allocations which result in up to 30% performance improvements in some scenarios. Measure Dirty Path The measure pass (MeasureOverride and InvalidateMeasure) is an important contributor to the computations performed to layout the UI, and any optimization performed in this area can significantly improve the time to show the first UI or improve binding update. We’ve changed the way MeasureOverride is invoked when InvalidateMeasure is called, where previously all ancestors of a control would be re-executing MeasureOverride,

Uno Platform Weekly Live Coding

Among our many features and initiatives, one that we want to highlight to our community is our weekly live-coding session that happens every Tuesday. Uno Platform Live Coding sessions are hosted by Uno Platform CTO Jérôme Laban and for roughly 60 minutes, Jérôme whiteboards and codes live side projects with Uno Platform, demonstrates new features, and troubleshoots different issues and bugs that arise. The Live coding sessions allow Uno Platform users to witness the thought process of a senior software engineer solving a problem and how it is then implemented into code. Users can join live and ask questions at any time and clarify concepts they may be unsure of. If you have any topic requests, questions that you want to be answered, feel free to reach out to @jlaban. Make sure you sign up for notification when Jérôme goes live on his Twitch channel – (re)starting next week March 8th, when he is back from vacation. Even heroes deserve to take a break! 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

XAML Fundamentals for Web & Mobile: ListView

It’s 2022 and XAML on the Web is now as relevant on Mobile and Web as it traditionally was on Windows Desktops. Between 2005 and 2013, Beatriz Stollnitz authored a series of blogs that covered a variety of XAML fundamentals and became a treasure trove of resources for developers. As you can imagine much of the information has since become outdated and most of the code samples no longer work out of the box with the latest version of Visual Studio. Last year, Nick Randolph, an Uno Platform contributor, revived the almost 10-year-old WPF blog series on his .NET Travels, and we’re picking up where he left off. In this continued version of XAML Basics, we added a focus on Web and Mobile where XAML is now very applicable. We carry on the efforts of making the adjustments needed to bring each control up to date as well as provide equivalent examples that work to include XAML cross platform support via Uno Platform and WinUI to Web, iOS, macOS, Android and even Linux! ListView A sizable benefit which came during the early days of WinRT XAML was the refreshed ListView and GridView controls. Microsoft engineered these controls to be smooth