Web

Implementing Lazy Loading Functionality in Uno WebAssembly Applications

No matter the purpose of your application or website, performance is essential to a great user experience. Slow loading apps and webpages will turn users away almost immediately. Fortunately, Lazy Loading is a technique used to optimize load time by only loading required content at first, and loading any remaining page content once the user needs it.  In this article, Johnny guides us through the steps required to implement the Lazy Loading functionality for ListView and Gridview controls in Uno Platform WASM applications. Follow Along with the Demo Project Source Code Lazy Loading Lazy Loading or incremental loading is a strategy to delay the loading of objects until they are actually needed. This can help reducing resources used by the application and increase loading times for the item collection, because only parts of the data are loaded initially. ScrollView For my usecase the trigger for loading more items is a certain scrolling threshold in the ListView and GridView control. To get the current scroll position we need to somehow access the ScrollView within the ListViewBase which is the base class for ListView and GridView. We will use the VisualTreeHelper class to get information about nodes in the visual tree and get a reference to the inner ScrollView of the ListViewBase var myScrollView = ExtendedVisualTreeHelper.GetFirstDescendant(myGridView); myScrollView.ViewChanged +=

Native Badges Come to Progressive Web Applications

  W3C’S recent first draft publication of web badging API, a feature that was previously only available on iOS and macOS targets of Uno Platform, has finally made its way to Android and web platforms. The Badging API gives web developers a means of setting a badge on a document or application, to act as an identifier that the state has changed without displaying a more distracting notification. In this article we will share with you how Martin Zikmund, a mobile/cloud developer and Uno Platform contributor, implemented the BadgeUpdateManager API in Uno Platform WebAssembly using this new API. Web Badging API The web Badging API provides a very simple set of methods to set and clear the badge: await navigator.setAppBadge(42); // Sets the app badge to 42 await navigator.clearAppBadge(); // Clears the app badge There is also a similar set of methods setClientBadge and clearClientBadge – these are very similar, but can only be used when the app is running (whereas setAppBadge and clearAppBadge can also be utilized from service worker). It is also important to note, that the badge is only set when the app is running as PWA on the device – it will not be applied when the app is just running as a tab

One Week Until Silverlight Goes Dark, Now What?

With October 12th around the corner, Silverlight will finally reach its end of life and will no longer be receiving future quality or security updates. Even though its last version was released back in 2011 we still hear from developers with applications that have been developed and remain in use. And for anyone who is tasked to maintain one of these applications; what are the alternatives? There are several options you can consider for migrating applications from Silverlight to a supported platform for delivering Rich Internet Applications, but a viable alternative that you should consider is Uno Platform. An open source-platform that delivers on the RIA promise without any plugins needed – using only C# and familiar XAML. What is Uno Platform and why should I choose it to migrate my Silverlight application? Uno Platform is a UI platform for single-codebase applications for Windows, Web/WebAssembly, iOS, macOS, Android and Linux and though we can find 50 Reasons why Uno is an excellent choice, here are the reasons that would stand out for existing Silverlight developers amongst many others. Uno uses UWP/WinUI XAML which has a lot in common with the Silverlight version of XAML – Much of the XAML will

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

Deploying C# Web Applications with Docker

This article covers Creating and running a Docker image Adding an image to a container registry Pulling an image from a container registry Accessing the properties of a container Imagine a scenario where you’ve created a web application, be it built with ASP.NET Core or the Uno Platform for WebAssembly, for example, and it’s now time to hand it over to the Operations team so it can be made available to the world. The operations team at your company are a great bunch of people but this isn’t your first time creating a web application. You know there are always issues to work out before the product is finally deployed and working. Everything always seems to work fine on your machine but when deploying, for the first time especially, it seems like there’s always some configuration that you forgot about. It’s not until after a series of conversations that things finally start working in production. Wouldn’t it be nice if you could just give the operations team a package of some sort and your web application just works? No more time lost trying to remember how you originally set up your environment or digging through the logs trying to determine

Uno Platform on Channel 9 Visual Studio Toolbox – 3 episodes

We are proud to have been featured on Channel 9 Visual Studio Toolbox show with Robert Green. In case you missed it, here is a quick summary. For all new to Uno, this is a great way to get to know it – straight from Uno CTO – Jerome Laban, as well as one of the key Uno community contributors – Martin Zikmund. Enjoy!   In Uno Platform – Behind the Scenes episode, Robert is joined by Jerome Laban, CTO of the Uno Platform. Back in December, we showed you how you can use Uno to build mobile, desktop and Web Assembly apps using C# and XAML. Jerome provides a behind the scenes look and how (and why) the Uno Platform was created, the decision to open source it and how it is maintained. He gives more insight into how it actually works and shows some new features that have been added since the previous episodes – items like WebAssembly Ahead of Time compilation (AOT), XAML Hot Reload, Uno Platform rendering options (pixel-perfect custom approach, or native approach) and a hint at upcoming MacOS support.   In Uno Platform Part 1 episode, Robert is joined by Martin Zikmund, one of

Uno Platform 2.0 RELOADED – General Availability, Hot Reload and more!

  In September 2019 at our inaugural UnoConf, we had released the preview of Uno Platform 2.0.  Today we are announcing general availability of Uno Platform 2.0 which includes not only the features announced at UnoConf, but also many others. One of the 2.0 release highlights is the fully functional XAML Hot Reload which works across Web (via WebAssembly), Android and iOS. Maybe best of all, you can do it ALL AT ONCE across all those platforms. This first blog post in Uno Platform 2.0 Reloaded series will give a lot of detail about XAML Hot Reload as well as the rest of the release. In addition, over the next few days we will drip-feed dedicated blogs for a few other release highlights. That said, if you’d like to jump to the bulleted list of all new features, bug fixes and known issues, you can see it at our GitHub. We are very proud of 2.0 release. Not only are we releasing a handful of major improvements, but we have also introduced over 70 smaller functionality improvements and we have closed over 80 bugs reported by community. Most importantly, over the past few months we saw massive contributions by the

Uno Platform Announces Version 2.0 of Cross-Platform Development Platform

New Integration with Xamarin Forms enables software developers to extend their existing Xamarin Forms apps to the Web via WebAssembly and Mono. Montreal, Canada – September 19, 2019 – Uno Platform , an open source platform for building cross-platform Web, Mobile and Desktop applications today announced integration with Xamarin Forms which enables software developers to extend their existing Xamarin Forms-based apps to the Web via WebAssembly. Developers have free access to this latest integration via the Open Source GitHub repository for Uno Platform. The integration was announced in a keynote presentation at the Uno Platform premier developer conference in Montreal, UnoConf. UnoConf featured speakers from Microsoft MVP Community such as Billy Hollis and Rocky Lhotka, as well as Microsoft’s Miguel de Icaza and Michael Hawker. One of the largest challenges mobile developers face is the inability to take business logic developed for their mobile-first applications to the Web. Xamarin Forms had enabled thousands of C# developers to quickly develop single-codebase enterprise apps for iOS and Android, a common request at enterprises as single-codebase cross-platform apps have proven to bring savings in development and maintenance cost.  Now, with the new integration of Xamarin Forms and Uno Platform, those apps can be