In this repository you can find samples on how to use Blazor within a webiew.
webview-messages-sample
contains an example for transmitting messages from a WPF webview to a Blazor app.
BlazorAppSample
contains the Blazor app project to access from the webview.WpfAppSample
contains the WPF project hosting the webview.
- Open the
.sln
with Visual Studio and start the projects - Use the
WPF
application to send messages to theBlazor
app and viceversa - Explore the code to find out how to use webview messages API in your projects
- The projects were created using
dotnet-8
with Visual Studio 2022 Community Edition - WebView2 JS documentation: https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/javascript/webview
- WebView2 C# documentation: https://learn.microsoft.com/en-us/microsoft-edge/webview2/get-started/wpf#step-10---communication-between-host-and-web-content
- Blazor logo and dotnet bot are property of Microsoft https://www.microsoft.com/