Soenneker.Maui.Blazor.Bridge
11.0.873
Prefix Reserved
dotnet add package Soenneker.Maui.Blazor.Bridge --version 11.0.873
NuGet\Install-Package Soenneker.Maui.Blazor.Bridge -Version 11.0.873
<PackageReference Include="Soenneker.Maui.Blazor.Bridge" Version="11.0.873" />
<PackageVersion Include="Soenneker.Maui.Blazor.Bridge" Version="11.0.873" />
<PackageReference Include="Soenneker.Maui.Blazor.Bridge" />
paket add Soenneker.Maui.Blazor.Bridge --version 11.0.873
#r "nuget: Soenneker.Maui.Blazor.Bridge, 11.0.873"
#:package Soenneker.Maui.Blazor.Bridge@11.0.873
#addin nuget:?package=Soenneker.Maui.Blazor.Bridge&version=11.0.873
#tool nuget:?package=Soenneker.Maui.Blazor.Bridge&version=11.0.873
Soenneker.Maui.Blazor.Bridge
Positions native .NET MAUI views over matching elements inside a MAUI BlazorWebView.
Features
- Embed MAUI components directly inside BlazorWebView like HTML elements.
- Maintain a structured overlay system for native elements.
- Provides typed and generic bridges for flexible component integration.
Installation
Install the package via NuGet:
dotnet add package Soenneker.Maui.Blazor.Bridge
Register the interop in CreateMauiApp:
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.Services.AddMauiBlazorBridgeAsScoped();
}
Layout Setup
To integrate MAUI components within BlazorWebView, modify your MainPage.xaml.
Wrap the BlazorWebView inside a Grid, and include an AbsoluteLayout (OverlayContainer) to host native elements:
<Grid>
<BlazorWebView x:Name="blazorWebView"
HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type local:Routes}" />
</BlazorWebView.RootComponents>
</BlazorWebView>
<AbsoluteLayout x:Name="OverlayContainer" BackgroundColor="Transparent" />
</Grid>
This setup ensures that MAUI-native elements overlay correctly within your BlazorWebView.
Usage
To bridge MAUI elements into Blazor, use either:
MauiBlazorTypedBridge<T>(Typed binding)MauiBlazorGenericBridge(Generic binding)
Example: Embedding a MauiLabel in Blazor
@using Microsoft.Maui.Controls
@implements IAsyncDisposable
<MauiBlazorTypedBridge @ref="_bridge" TComponent="Label" Component="_label" />
@code {
Label? _label;
MauiBlazorTypedBridge<Label>? _bridge;
protected override void OnInitialized()
{
_label = new Label
{
Text = "This is a MAUI Label",
BackgroundColor = Colors.Transparent,
TextColor = Colors.Black
};
}
public async ValueTask DisposeAsync()
{
if (_bridge != null)
await _bridge.DisposeAsync();
}
}
The bridge observes its placeholder element in the browser and keeps the native view aligned beneath it. Dispose the bridge when the Blazor component is removed; disposal unregisters the callback, browser observers, native handlers, and overlay view.
The overlay sits above the web view. Do not set InputTransparent="True" when the native views must receive taps. Areas covered by the overlay can intercept input intended for the underlying web content, so keep native view bounds as small as practical.
MauiBlazorGenericBridge creates a parameterless View type and can apply common or dictionary-supplied public properties. Use the typed bridge when you already own the view instance or need native event handlers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Microsoft.AspNetCore.Components (>= 11.0.0)
- Microsoft.Maui.Controls (>= 11.0.10)
- Soenneker.Blazor.CallbackRegistry (>= 11.0.1254)
- Soenneker.Extensions.Double (>= 11.0.483)
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 |
|---|---|---|
| 11.0.873 | 107 | 11/19/2026 |
| 11.0.872 | 55 | 11/19/2026 |
| 11.0.870 | 76 | 11/18/2026 |
| 11.0.868 | 77 | 11/18/2026 |
| 11.0.867 | 127 | 11/16/2026 |
| 11.0.865 | 106 | 11/16/2026 |
| 11.0.864 | 108 | 11/16/2026 |
| 11.0.862 | 98 | 11/15/2026 |
| 11.0.860 | 104 | 11/15/2026 |
| 11.0.858 | 103 | 11/15/2026 |
| 11.0.856 | 100 | 11/14/2026 |
| 11.0.855 | 101 | 11/14/2026 |
| 11.0.854 | 105 | 11/14/2026 |
| 11.0.853 | 174 | 11/12/2026 |
| 11.0.852 | 101 | 11/12/2026 |
| 11.0.850 | 133 | 11/11/2026 |
| 11.0.848 | 100 | 11/11/2026 |
| 11.0.846 | 96 | 11/11/2026 |
| 11.0.845 | 100 | 11/11/2026 |
| 11.0.844 | 80 | 11/10/2026 |
Update dependency Soenneker.Extensions.Double to 11.0.483 (#1530)