formaui-net.Blazor.WebView 1.0.0-preview.27

Prefix Reserved
This is a prerelease version of formaui-net.Blazor.WebView.
dotnet add package formaui-net.Blazor.WebView --version 1.0.0-preview.27
                    
NuGet\Install-Package formaui-net.Blazor.WebView -Version 1.0.0-preview.27
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="formaui-net.Blazor.WebView" Version="1.0.0-preview.27" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="formaui-net.Blazor.WebView" Version="1.0.0-preview.27" />
                    
Directory.Packages.props
<PackageReference Include="formaui-net.Blazor.WebView" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add formaui-net.Blazor.WebView --version 1.0.0-preview.27
                    
#r "nuget: formaui-net.Blazor.WebView, 1.0.0-preview.27"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package formaui-net.Blazor.WebView@1.0.0-preview.27
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=formaui-net.Blazor.WebView&version=1.0.0-preview.27&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=formaui-net.Blazor.WebView&version=1.0.0-preview.27&prerelease
                    
Install as a Cake Tool

Forma.Blazor.WebView

The WebView half of Forma's component library: the registration a Blazor Hybrid application makes, in WPF, Windows Forms or MAUI on Windows, or MAUI on Android, iOS or Mac Catalyst, which registers what the components need in a web view, the culture its web views keep, one for the whole application by default, or one for each web view, and the theme every web view draws, the application's.

Install

dotnet add package formaui-net.Blazor.WebView --prerelease

It brings formaui-net.Blazor and the Framework packages the components build on.

Register

Beside the platform's own registrar, AddWpfBlazorWebView(), AddWindowsFormsBlazorWebView() or AddMauiBlazorWebView(), in either order:

using Forma.Blazor;

services.AddWpfBlazorWebView();
services.AddFormaWebViewIntegration();

AddFormaWebViewIntegration() registers what AddFormaUIServices() registers for every render mode, each only where nothing is registered for it yet, and the culture's WebView half, Forma.Framework.Culture.Blazor.WebView: by default, one culture state and one switch for the application, which every web view follows. It registers the theme's WebView half too, Forma.Framework.Themes.WebView: one theme choice and one switch for the application, read from and kept in the application's store where it registers one, and then the theme picker's registration in each web view's scope, AddFormaThemeCoordination(), which leaves the application's switch in place. WebViewIntegrationOptions.InputRouting sets the application's input policy:

services.AddFormaWebViewIntegration(options => options.InputRouting = new InputRouterOptions { ... });

WebViewIntegrationOptions.CultureArrangement gives each web view a culture of its own in place of the application's one, each web view switching alone:

services.AddFormaWebViewIntegration(options => options.CultureArrangement = CultureArrangement.Independent);

The page

The application's wwwroot/index.html links Forma's stylesheets, in the order and from the place the library's README sets out, then its own scoped styles and _framework/blazor.webview.js, as a standalone WebAssembly app's page does:

<link rel="stylesheet" href="_content/Forma.Blazor/forma-tokens.css" data-forma-theme-stylesheet="forma" />
<link rel="stylesheet" href="_content/Forma.Blazor/forma-high-contrast.css" data-forma-theme-stylesheet="forma-high-contrast" />
<link rel="stylesheet" href="_content/Forma.Blazor/forma-reset.css" />
<link rel="stylesheet" href="_content/Forma.Blazor/forma-base.css" />
<link rel="stylesheet" href="_content/Forma.Blazor/forma-input.css" />
<link rel="stylesheet" href="MyApp.styles.css" />

Each theme's stylesheet names its theme, Forma's own theme the token stylesheet, as the theme's WebView half sets out, and a WPF or Windows Forms application attaches each web view to the application's theme as it initializes, through formaui-net.Framework.Themes.WebView2, so every document it creates draws the choice in force from its first paint; a MAUI application on Android or Windows registers formaui-net.Framework.Themes.Blazor.WebView.Maui, whose web views attach themselves.

A MAUI application's page loads the script with autostart="false", leaving Blazor's start to MAUI, which starts it once the web view's channel to the application is in place.

Each web view's document takes its culture, the application's by default, from its first Forma component, so the page carries no culture marker of its own.

Limits

A web view has no hub between its page and the application, so SignalR's message limit doesn't apply. Forma holds what the page sends to limits of its own, as on a server: JSTransferOptions.MaximumLength, 16 MiB, for a value with no maximum of its own, FileUploaderOptions.MaxFileSize, 10 MiB, for an uploaded file, and a text field's MaxLength. The library's README sets each out.

The application

Every web view resolves from the application's one service provider, so by default they share its culture, and a WPF application disposes a web view as its native window closes, since WPF disposes no control on its own. The library's README sets each host up in full, its native user interface and the culture it keeps from one run to the next among it.

License

Apache License 2.0, under the repository's LICENSE.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.27 40 12/3/2026
1.0.0-preview.26 46 12/3/2026
1.0.0-preview.25 48 12/2/2026
1.0.0-preview.24 49 12/1/2026
1.0.0-preview.23 66 11/30/2026
1.0.0-preview.22 62 11/30/2026
1.0.0-preview.21 62 11/29/2026
1.0.0-preview.20 75 11/26/2026
1.0.0-preview.19 61 11/26/2026
1.0.0-preview.18 65 11/26/2026
1.0.0-preview.17 58 11/26/2026
1.0.0-preview.16 57 11/24/2026
1.0.0-preview.15 59 11/23/2026
1.0.0-preview.14 56 11/23/2026
1.0.0-preview.13 58 11/21/2026
1.0.0-preview.12 67 11/20/2026
1.0.0-preview.11 63 11/18/2026
1.0.0-preview.10 65 11/17/2026
1.0.0-preview.9 68 11/17/2026
1.0.0-preview.8 55 11/17/2026
Loading failed

What this release changed is in Forma's changelog: https://github.com/FormaUI/Forma/blob/v1.0.0-preview.27/CHANGELOG.md