News

Mobile Blazor Bindings Unifies Cross-Platform UI

Microsoft shipped a new preview of its experimental project, Mobile Blazor Bindings, with a UI unification across the web and mobile/desktop spaces.

Experimental Mobile Blazor Bindings help developers use C# and .NET to build native and hybrid mobile apps, targeting Android, iOS, Windows and macOS. Developers can use Razor syntax to define UI components and behaviors of an application with underlying UI components based on Xamarin.Forms native UI components, while they are mixed with HTML elements in hybrid apps.

In the new Preview 5, more UI sharing is enabled.

Mixing and Matching Native and Web UI
[Click on image for larger view.] Mixing and Matching Native and Web UI (source: Microsoft).

"You can now use a Razor Class Library (RCL) to build your UI and app logic once and use it in a Blazor Web app and in a Mobile Blazor Bindings app," said Microsoft's Eilon Lipton in an Oct. 30 blog post.

"You can build one UI using Blazor Web and host it in a Blazor Server or Blazor Web Assembly app and also in a Mobile Blazor Bindings hybrid app to target Android, iOS, macOS and Windows."

Reusable UI
[Click on image for larger view.] Reusable UI (source: Microsoft).

Support for Razor Class Libraries(RCLs) -- reusable packages of app UI and logic -- is generally improved in Preview 5. "You can use the same library in a Blazor Hybrid application as part of a mobile or desktop app," Lipton said. "The web content is hosted in a Web View, just like any hybrid app content, and it can interact with any native parts of the application, and the reverse is true as well. Previous versions included limited support for RCLs, and this version adds improved support for them, particularly support for serving static assets such as CSS and images, as well as support for JSInterop for interop between JavaScript and .NET code."

In other updates, the Shell control from Xamarin.Forms can be used for navigation, and developers can directly use SkiaSharp's Canvas APIs to render rich high-performance graphics directly in an app.

More information is provided in the release notes.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube