formaui-net.Framework.Themes.WebView2 1.0.0-preview.27

Prefix Reserved
This is a prerelease version of formaui-net.Framework.Themes.WebView2.
dotnet add package formaui-net.Framework.Themes.WebView2 --version 1.0.0-preview.27
                    
NuGet\Install-Package formaui-net.Framework.Themes.WebView2 -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.Framework.Themes.WebView2" 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.Framework.Themes.WebView2" Version="1.0.0-preview.27" />
                    
Directory.Packages.props
<PackageReference Include="formaui-net.Framework.Themes.WebView2" />
                    
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.Framework.Themes.WebView2 --version 1.0.0-preview.27
                    
#r "nuget: formaui-net.Framework.Themes.WebView2, 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.Framework.Themes.WebView2@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.Framework.Themes.WebView2&version=1.0.0-preview.27&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=formaui-net.Framework.Themes.WebView2&version=1.0.0-preview.27&prerelease
                    
Install as a Cake Tool

Forma.Framework.Themes.WebView2

The application's theme choice in a WebView2, the web view of WPF and Windows Forms, attached through Attach(CoreWebView2) to the initialized control the host supplies. Every document a WebView2 creates draws the choice in force from its first paint, before the host page's own content, and the document it shows follows each choice the application accepts, as Forma.Framework.Themes.WebView sets out.

Install

dotnet add package formaui-net.Framework.Themes.WebView2 --prerelease

It brings formaui-net.Framework.Themes.WebView, which AddFormaWebViewIntegration() registers.

Use it

Each web view attaches as it initializes, before its first navigation, in the handler of its BlazorWebViewInitialized event, the same for WPF's BlazorWebView and Windows Forms':

using Forma.Framework.Themes.WebView;
using Forma.Framework.Themes.WebView2;

webView.BlazorWebViewInitialized += (_, e) => services.GetRequiredService<WebViewThemes>().Attach(e.WebView.CoreWebView2);

The handler is added before the web view starts, as the native window that holds it is created. The host page links each registered theme's stylesheet, as the host page sets out.

License

Apache License 2.0, under the repository's LICENSE.

Product Compatible and additional computed target framework versions.
.NET net11.0-windows7.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 39 12/3/2026
1.0.0-preview.26 46 12/3/2026
1.0.0-preview.25 45 12/2/2026
1.0.0-preview.24 48 12/1/2026
1.0.0-preview.23 63 11/30/2026
1.0.0-preview.22 61 11/30/2026
1.0.0-preview.21 63 11/29/2026

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