https://github.com/edandersen/blazor-desktop-crossplatform-sample
Example of an actual cross platform web and desktop hybrid Blazor app using the .NET 6 Blazor Desktop implementation
https://github.com/edandersen/blazor-desktop-crossplatform-sample
blazor blazor-desktop csharp dotnet
Last synced: 5 months ago
JSON representation
Example of an actual cross platform web and desktop hybrid Blazor app using the .NET 6 Blazor Desktop implementation
- Host: GitHub
- URL: https://github.com/edandersen/blazor-desktop-crossplatform-sample
- Owner: edandersen
- Created: 2021-04-04T14:08:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-14T22:31:22.000Z (over 1 year ago)
- Last Synced: 2025-10-25T07:39:08.771Z (7 months ago)
- Topics: blazor, blazor-desktop, csharp, dotnet
- Language: HTML
- Homepage:
- Size: 32.9 MB
- Stars: 176
- Watchers: 12
- Forks: 45
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Cross platform Blazor Desktop example
This sample shows a Blazor Desktop (using the official APIs coming in .NET 6) app running in both a web browser and in a WinForms and WPF wrapper. This uses the default Blazor Server template as an example which is a bit prettier than the one on the .NET 6 Preview 2 announcement post.
Code shared between the Blazor Desktop app and the Blazor Server apps is in the WebviewAppShared Razor class library.

Because you now have the power of Chromium you can now do cool WebGL things like this inside WPF and WinForms apps:

To run it open ```/BlazorDesktopTest.sln``` in Visual Studio 2022 .NET 6 SDK installed. You can then F5 the BlazorDesktopTest and BlazorWinFormsApp projects.
Updated for .NET 6 RTM and the official ```Microsoft.AspNetCore.Components.WebView``` nuget package on 9th November 2021.
Contains a snazzy WebGL water demo from https://github.com/evanw/webgl-water. No way could I write this!