├── .gitignore ├── BlazorTemplate.Maui.sln ├── BlazorTemplate.Maui ├── App.xaml ├── App.xaml.cs ├── BlazorTemplate.Maui.csproj ├── MainPage.xaml ├── MainPage.xaml.cs ├── MauiProgram.cs ├── Platforms │ ├── Android │ │ ├── AndroidManifest.xml │ │ ├── MainActivity.cs │ │ ├── MainApplication.cs │ │ └── Resources │ │ │ └── values │ │ │ └── colors.xml │ ├── MacCatalyst │ │ ├── AppDelegate.cs │ │ ├── Info.plist │ │ └── Program.cs │ ├── Windows │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Package.appxmanifest │ │ └── app.manifest │ └── iOS │ │ ├── AppDelegate.cs │ │ ├── Info.plist │ │ ├── Program.cs │ │ └── Resources │ │ └── LaunchScreen.xib ├── Properties │ └── launchSettings.json ├── Resources │ ├── appicon.svg │ └── appiconfg.svg └── wwwroot │ └── index.html ├── BlazorTemplate.Wasm.sln ├── BlazorTemplate.Wasm ├── BlazorTemplate.Wasm.csproj ├── Program.cs ├── Properties │ └── launchSettings.json └── wwwroot │ ├── icon-192.png │ ├── icon-512.png │ ├── index.html │ ├── manifest.json │ ├── service-worker.js │ └── service-worker.published.js ├── BlazorTemplate.WebView.WinForms ├── BlazorTemplate.WebView.WinForms.csproj ├── MainForm.cs ├── MainForm.designer.cs ├── MainForm.resx ├── Program.cs └── wwwroot │ └── index.html ├── BlazorTemplate.WebView.Wpf ├── App.xaml ├── App.xaml.cs ├── BlazorTemplate.WebView.Wpf.csproj ├── MainWindow.xaml ├── MainWindow.xaml.cs └── wwwroot │ └── index.html ├── BlazorTemplate.WebView.sln ├── BlazorTemplate.sln ├── BlazorTemplate ├── BlazorTemplate.csproj ├── Main.razor ├── Pages │ └── Index.razor ├── _Imports.razor └── wwwroot │ └── css │ └── app.css ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | bin 3 | obj 4 | *.user -------------------------------------------------------------------------------- /BlazorTemplate.Maui.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.0.31611.283 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.Maui", "BlazorTemplate.Maui\BlazorTemplate.Maui.csproj", "{DE250823-BDF7-4945-8630-4EAD8A3EBEE4}" 6 | EndProject 7 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate", "BlazorTemplate\BlazorTemplate.csproj", "{B393E936-8470-4962-AF43-6402A4CDD26B}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Any CPU = Debug|Any CPU 12 | Release|Any CPU = Release|Any CPU 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {DE250823-BDF7-4945-8630-4EAD8A3EBEE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 16 | {DE250823-BDF7-4945-8630-4EAD8A3EBEE4}.Debug|Any CPU.Build.0 = Debug|Any CPU 17 | {DE250823-BDF7-4945-8630-4EAD8A3EBEE4}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 18 | {DE250823-BDF7-4945-8630-4EAD8A3EBEE4}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {DE250823-BDF7-4945-8630-4EAD8A3EBEE4}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {DE250823-BDF7-4945-8630-4EAD8A3EBEE4}.Release|Any CPU.Deploy.0 = Release|Any CPU 21 | {B393E936-8470-4962-AF43-6402A4CDD26B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {B393E936-8470-4962-AF43-6402A4CDD26B}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {B393E936-8470-4962-AF43-6402A4CDD26B}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {B393E936-8470-4962-AF43-6402A4CDD26B}.Release|Any CPU.Build.0 = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | GlobalSection(ExtensibilityGlobals) = postSolution 30 | SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Application = Microsoft.Maui.Controls.Application; 2 | 3 | namespace BlazorTemplate.Maui 4 | { 5 | public partial class App : Application 6 | { 7 | public App() 8 | { 9 | InitializeComponent(); 10 | 11 | MainPage = new MainPage(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/BlazorTemplate.Maui.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0-android;net6.0-ios;net6.0-maccatalyst 5 | $(TargetFrameworks);net6.0-windows10.0.19041 6 | Exe 7 | BlazorTemplate.Maui 8 | true 9 | true 10 | true 11 | false 12 | 13 | 14 | BlazorTemplate.Maui 15 | 16 | 17 | com.companyname.BlazorTemplate.Maui 18 | 19 | 20 | 1 21 | 22 | 23 | True 24 | 25 | 14.2 26 | 14.0 27 | 21.0 28 | 10.0.17763.0 29 | 10.0.17763.0 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | WinExe 48 | win-x64 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Maui.Controls; 2 | 3 | namespace BlazorTemplate.Maui 4 | { 5 | public partial class MainPage : ContentPage 6 | { 7 | public MainPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/MauiProgram.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.WebView.Maui; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using Microsoft.Maui.Controls.Hosting; 4 | using Microsoft.Maui.Hosting; 5 | 6 | namespace BlazorTemplate.Maui 7 | { 8 | public static class MauiProgram 9 | { 10 | public static MauiApp CreateMauiApp() 11 | { 12 | var builder = MauiApp.CreateBuilder(); 13 | builder 14 | .RegisterBlazorMauiWebView() 15 | .UseMauiApp(); 16 | 17 | builder.Services.AddBlazorWebView(); 18 | 19 | return builder.Build(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Microsoft.Maui; 4 | 5 | namespace BlazorTemplate.Maui 6 | { 7 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)] 8 | public class MainActivity : MauiAppCompatActivity 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Android/MainApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.App; 3 | using Android.Runtime; 4 | using Microsoft.Maui; 5 | using Microsoft.Maui.Hosting; 6 | 7 | namespace BlazorTemplate.Maui 8 | { 9 | [Application] 10 | public class MainApplication : MauiApplication 11 | { 12 | public MainApplication(IntPtr handle, JniHandleOwnership ownership) 13 | : base(handle, ownership) 14 | { 15 | } 16 | 17 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 18 | } 19 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #512BD4 4 | #2B0B98 5 | #2B0B98 6 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/MacCatalyst/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using Microsoft.Maui; 3 | using Microsoft.Maui.Hosting; 4 | 5 | namespace BlazorTemplate.Maui 6 | { 7 | [Register("AppDelegate")] 8 | public class AppDelegate : MauiUIApplicationDelegate 9 | { 10 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 11 | } 12 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/MacCatalyst/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UIRequiredDeviceCapabilities 11 | 12 | arm64 13 | 14 | UISupportedInterfaceOrientations 15 | 16 | UIInterfaceOrientationPortrait 17 | UIInterfaceOrientationLandscapeLeft 18 | UIInterfaceOrientationLandscapeRight 19 | 20 | UISupportedInterfaceOrientations~ipad 21 | 22 | UIInterfaceOrientationPortrait 23 | UIInterfaceOrientationPortraitUpsideDown 24 | UIInterfaceOrientationLandscapeLeft 25 | UIInterfaceOrientationLandscapeRight 26 | 27 | XSAppIconAssets 28 | Assets.xcassets/appicon.appiconset 29 | 30 | 31 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/MacCatalyst/Program.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace BlazorTemplate.Maui 4 | { 5 | public class Program 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, typeof(AppDelegate)); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Windows/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Windows/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Maui; 2 | using Microsoft.Maui.Hosting; 3 | using Microsoft.UI.Xaml; 4 | 5 | namespace BlazorTemplate.Maui.WinUI 6 | { 7 | /// 8 | /// Provides application-specific behavior to supplement the default Application class. 9 | /// 10 | public partial class App : MauiWinUIApplication 11 | { 12 | /// 13 | /// Initializes the singleton application object. This is the first line of authored code 14 | /// executed, and as such is the logical equivalent of main() or WinMain(). 15 | /// 16 | public App() 17 | { 18 | this.InitializeComponent(); 19 | } 20 | 21 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 22 | 23 | protected override void OnLaunched(LaunchActivatedEventArgs args) 24 | { 25 | base.OnLaunched(args); 26 | 27 | Microsoft.Maui.Essentials.Platform.OnLaunched(args); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Windows/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | BlazorTemplate.Maui 16 | Microsoft 17 | Assets\appiconStoreLogo.png 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 39 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/Windows/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | true/PM 12 | PerMonitorV2, PerMonitor 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using Microsoft.Maui; 3 | using Microsoft.Maui.Hosting; 4 | 5 | namespace BlazorTemplate.Maui 6 | { 7 | [Register("AppDelegate")] 8 | public class AppDelegate : MauiUIApplicationDelegate 9 | { 10 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 11 | } 12 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LSRequiresIPhoneOS 6 | 7 | UIDeviceFamily 8 | 9 | 1 10 | 2 11 | 12 | UIRequiredDeviceCapabilities 13 | 14 | arm64 15 | 16 | UISupportedInterfaceOrientations 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationLandscapeLeft 20 | UIInterfaceOrientationLandscapeRight 21 | 22 | UISupportedInterfaceOrientations~ipad 23 | 24 | UIInterfaceOrientationPortrait 25 | UIInterfaceOrientationPortraitUpsideDown 26 | UIInterfaceOrientationLandscapeLeft 27 | UIInterfaceOrientationLandscapeRight 28 | 29 | XSAppIconAssets 30 | Assets.xcassets/appicon.appiconset 31 | 32 | 33 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/iOS/Program.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace BlazorTemplate.Maui 4 | { 5 | public class Program 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, typeof(AppDelegate)); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Platforms/iOS/Resources/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Windows Machine": { 4 | "commandName": "MsixPackage", 5 | "nativeDebugging": false 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Resources/appicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/Resources/appiconfg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BlazorTemplate.Maui/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BlazorTemplate! 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | An unhandled error has occurred. 17 | Reload 18 | 🗙 19 |
20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.1.31903.286 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.Wasm", "BlazorTemplate.Wasm\BlazorTemplate.Wasm.csproj", "{C75997E2-33B1-41A7-9BD1-F0982B9E2D51}" 6 | EndProject 7 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate", "BlazorTemplate\BlazorTemplate.csproj", "{24B69370-D783-4A94-ACD1-76E21107AE67}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Any CPU = Debug|Any CPU 12 | Release|Any CPU = Release|Any CPU 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 16 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Debug|Any CPU.Build.0 = Debug|Any CPU 17 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Release|Any CPU.ActiveCfg = Release|Any CPU 18 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Release|Any CPU.Build.0 = Release|Any CPU 19 | {24B69370-D783-4A94-ACD1-76E21107AE67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {24B69370-D783-4A94-ACD1-76E21107AE67}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {24B69370-D783-4A94-ACD1-76E21107AE67}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {24B69370-D783-4A94-ACD1-76E21107AE67}.Release|Any CPU.Build.0 = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(SolutionProperties) = preSolution 25 | HideSolutionNode = FALSE 26 | EndGlobalSection 27 | GlobalSection(ExtensibilityGlobals) = postSolution 28 | SolutionGuid = {85A6C315-A033-45D6-8825-9CED8F58C998} 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/BlazorTemplate.Wasm.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | service-worker-assets.js 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/Program.cs: -------------------------------------------------------------------------------- 1 | using BlazorTemplate; 2 | using Microsoft.AspNetCore.Components.Web; 3 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 4 | 5 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 6 | builder.RootComponents.Add
("#app"); 7 | builder.RootComponents.Add("head::after"); 8 | 9 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 10 | 11 | await builder.Build().RunAsync(); 12 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:41239", 7 | "sslPort": 44361 8 | } 9 | }, 10 | "profiles": { 11 | "BlazorTemplate.Wasm": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 16 | "applicationUrl": "https://localhost:7187;http://localhost:5187", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/wwwroot/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jinjinov/blazor-wasm-maui-winforms-wpf-template/a9873c5cbb23d6402d7f48c7e4bdc982beb019bd/BlazorTemplate.Wasm/wwwroot/icon-192.png -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jinjinov/blazor-wasm-maui-winforms-wpf-template/a9873c5cbb23d6402d7f48c7e4bdc982beb019bd/BlazorTemplate.Wasm/wwwroot/icon-512.png -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BlazorTemplate! 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 |
19 | An unhandled error has occurred. 20 | Reload 21 | 🗙 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlazorTemplate.Wasm", 3 | "short_name": "BlazorTemplate.Wasm", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "prefer_related_applications": false, 9 | "icons": [ 10 | { 11 | "src": "icon-512.png", 12 | "type": "image/png", 13 | "sizes": "512x512" 14 | }, 15 | { 16 | "src": "icon-192.png", 17 | "type": "image/png", 18 | "sizes": "192x192" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /BlazorTemplate.Wasm/wwwroot/service-worker.published.js: -------------------------------------------------------------------------------- 1 | // Caution! Be sure you understand the caveats before publishing an application with 2 | // offline support. See https://aka.ms/blazor-offline-considerations 3 | 4 | self.importScripts('./service-worker-assets.js'); 5 | self.addEventListener('install', event => event.waitUntil(onInstall(event))); 6 | self.addEventListener('activate', event => event.waitUntil(onActivate(event))); 7 | self.addEventListener('fetch', event => event.respondWith(onFetch(event))); 8 | 9 | const cacheNamePrefix = 'offline-cache-'; 10 | const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`; 11 | const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ]; 12 | const offlineAssetsExclude = [ /^service-worker\.js$/ ]; 13 | 14 | async function onInstall(event) { 15 | console.info('Service worker: Install'); 16 | 17 | // Fetch and cache all matching items from the assets manifest 18 | const assetsRequests = self.assetsManifest.assets 19 | .filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url))) 20 | .filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url))) 21 | .map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' })); 22 | await caches.open(cacheName).then(cache => cache.addAll(assetsRequests)); 23 | } 24 | 25 | async function onActivate(event) { 26 | console.info('Service worker: Activate'); 27 | 28 | // Delete unused caches 29 | const cacheKeys = await caches.keys(); 30 | await Promise.all(cacheKeys 31 | .filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName) 32 | .map(key => caches.delete(key))); 33 | } 34 | 35 | async function onFetch(event) { 36 | let cachedResponse = null; 37 | if (event.request.method === 'GET') { 38 | // For all navigation requests, try to serve index.html from cache 39 | // If you need some URLs to be server-rendered, edit the following check to exclude those URLs 40 | const shouldServeIndexHtml = event.request.mode === 'navigate'; 41 | 42 | const request = shouldServeIndexHtml ? 'index.html' : event.request; 43 | const cache = await caches.open(cacheName); 44 | cachedResponse = await cache.match(request); 45 | } 46 | 47 | return cachedResponse || fetch(event.request); 48 | } 49 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.WinForms/BlazorTemplate.WebView.WinForms.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0-windows 5 | 7.0 6 | WinExe 7 | true 8 | false 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | PreserveNewest 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.WinForms/MainForm.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.WebView.WindowsForms; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using System.Windows.Forms; 4 | 5 | namespace BlazorTemplate.WebView.WinForms 6 | { 7 | public partial class MainForm : Form 8 | { 9 | public MainForm() 10 | { 11 | var services = new ServiceCollection(); 12 | services.AddBlazorWebView(); 13 | 14 | InitializeComponent(); 15 | 16 | blazorWebView.HostPage = @"wwwroot\index.html"; 17 | blazorWebView.Services = services.BuildServiceProvider(); 18 | blazorWebView.RootComponents.Add
("#app"); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.WinForms/MainForm.designer.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorTemplate.WebView.WinForms 2 | { 3 | partial class MainForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.blazorWebView = new Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView(); 32 | this.SuspendLayout(); 33 | // 34 | // blazorWebView 35 | // 36 | this.blazorWebView.Dock = System.Windows.Forms.DockStyle.Fill; 37 | this.blazorWebView.Location = new System.Drawing.Point(3, 3); 38 | this.blazorWebView.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); 39 | this.blazorWebView.Name = "blazorWebView"; 40 | this.blazorWebView.Size = new System.Drawing.Size(554, 257); 41 | this.blazorWebView.TabIndex = 20; 42 | // 43 | // MainForm 44 | // 45 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); 46 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 47 | this.ClientSize = new System.Drawing.Size(582, 407); 48 | this.Controls.Add(this.blazorWebView); 49 | this.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1); 50 | this.Name = "MainForm"; 51 | this.Text = "BlazorTemplate!"; 52 | this.ResumeLayout(false); 53 | this.PerformLayout(); 54 | 55 | } 56 | 57 | #endregion 58 | 59 | private Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView blazorWebView; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.WinForms/MainForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.WinForms/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace BlazorTemplate.WebView.WinForms 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | AppDomain.CurrentDomain.UnhandledException += (sender, error) => 15 | { 16 | MessageBox.Show(text: error.ExceptionObject.ToString(), caption: "Error"); 17 | }; 18 | 19 | Application.SetHighDpiMode(HighDpiMode.SystemAware); 20 | Application.EnableVisualStyles(); 21 | Application.SetCompatibleTextRenderingDefault(false); 22 | Application.Run(new MainForm()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.WinForms/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BlazorTemplate! 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | An unhandled error has occurred. 17 | Reload 18 | 🗙 19 |
20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.Wpf/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.Wpf/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace BlazorTemplate.WebView.Wpf 5 | { 6 | /// 7 | /// Interaction logic for App.xaml 8 | /// 9 | public partial class App : Application 10 | { 11 | private void Application_Startup(object sender, StartupEventArgs e) 12 | { 13 | AppDomain.CurrentDomain.UnhandledException += (sender, error) => 14 | { 15 | MessageBox.Show(error.ExceptionObject.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error); 16 | }; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.Wpf/BlazorTemplate.WebView.Wpf.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0-windows 5 | 7.0 6 | WinExe 7 | true 8 | false 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | PreserveNewest 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.Wpf/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.Wpf/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | using System.Windows; 3 | 4 | namespace BlazorTemplate.WebView.Wpf 5 | { 6 | /// 7 | /// Interaction logic for MainWindow.xaml 8 | /// 9 | public partial class MainWindow : Window 10 | { 11 | public MainWindow() 12 | { 13 | var services = new ServiceCollection(); 14 | services.AddBlazorWebView(); 15 | Resources.Add("services", services.BuildServiceProvider()); 16 | 17 | InitializeComponent(); 18 | } 19 | } 20 | 21 | // Workaround for compiler error "error MC3050: Cannot find the type 'local:Main'" 22 | // It seems that, although WPF's design-time build can see Razor components, its runtime build cannot. 23 | public partial class Main { } 24 | } 25 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.Wpf/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BlazorTemplate! 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | An unhandled error has occurred. 17 | Reload 18 | 🗙 19 |
20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BlazorTemplate.WebView.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.1.31903.286 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.WebView.WinForms", "BlazorTemplate.WebView.WinForms\BlazorTemplate.WebView.WinForms.csproj", "{E22A575B-C502-49F6-A88F-F978564613E5}" 6 | EndProject 7 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.WebView.Wpf", "BlazorTemplate.WebView.Wpf\BlazorTemplate.WebView.Wpf.csproj", "{C8ED53E1-4F42-4F89-BA27-B8387B0ECF50}" 8 | EndProject 9 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate", "BlazorTemplate\BlazorTemplate.csproj", "{12FC202D-F316-4847-AC9B-9E1B8BD3D7ED}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Any CPU = Debug|Any CPU 14 | Release|Any CPU = Release|Any CPU 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {E22A575B-C502-49F6-A88F-F978564613E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {E22A575B-C502-49F6-A88F-F978564613E5}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {E22A575B-C502-49F6-A88F-F978564613E5}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {E22A575B-C502-49F6-A88F-F978564613E5}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {C8ED53E1-4F42-4F89-BA27-B8387B0ECF50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {C8ED53E1-4F42-4F89-BA27-B8387B0ECF50}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {C8ED53E1-4F42-4F89-BA27-B8387B0ECF50}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {C8ED53E1-4F42-4F89-BA27-B8387B0ECF50}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {12FC202D-F316-4847-AC9B-9E1B8BD3D7ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {12FC202D-F316-4847-AC9B-9E1B8BD3D7ED}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {12FC202D-F316-4847-AC9B-9E1B8BD3D7ED}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {12FC202D-F316-4847-AC9B-9E1B8BD3D7ED}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {85A6C315-A033-45D6-8825-9CED8F58C998} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /BlazorTemplate.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.1.31903.286 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.Wasm", "BlazorTemplate.Wasm\BlazorTemplate.Wasm.csproj", "{C75997E2-33B1-41A7-9BD1-F0982B9E2D51}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate", "BlazorTemplate\BlazorTemplate.csproj", "{1E7F02CE-761B-4177-9622-451A0F4F62EB}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.WebView.WinForms", "BlazorTemplate.WebView.WinForms\BlazorTemplate.WebView.WinForms.csproj", "{5C2E028C-0AD6-4884-A447-0DE5404D7978}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.WebView.Wpf", "BlazorTemplate.WebView.Wpf\BlazorTemplate.WebView.Wpf.csproj", "{48BAB0C2-C5C8-43F0-A324-E3E1268DF8D8}" 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTemplate.Maui", "BlazorTemplate.Maui\BlazorTemplate.Maui.csproj", "{189AB26B-3E4E-4E1C-A1B3-79E611731CD0}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {C75997E2-33B1-41A7-9BD1-F0982B9E2D51}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {1E7F02CE-761B-4177-9622-451A0F4F62EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {1E7F02CE-761B-4177-9622-451A0F4F62EB}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {1E7F02CE-761B-4177-9622-451A0F4F62EB}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {1E7F02CE-761B-4177-9622-451A0F4F62EB}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {5C2E028C-0AD6-4884-A447-0DE5404D7978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {5C2E028C-0AD6-4884-A447-0DE5404D7978}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {5C2E028C-0AD6-4884-A447-0DE5404D7978}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {5C2E028C-0AD6-4884-A447-0DE5404D7978}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {48BAB0C2-C5C8-43F0-A324-E3E1268DF8D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {48BAB0C2-C5C8-43F0-A324-E3E1268DF8D8}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {48BAB0C2-C5C8-43F0-A324-E3E1268DF8D8}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {48BAB0C2-C5C8-43F0-A324-E3E1268DF8D8}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {189AB26B-3E4E-4E1C-A1B3-79E611731CD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 39 | {189AB26B-3E4E-4E1C-A1B3-79E611731CD0}.Debug|Any CPU.Build.0 = Debug|Any CPU 40 | {189AB26B-3E4E-4E1C-A1B3-79E611731CD0}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 41 | {189AB26B-3E4E-4E1C-A1B3-79E611731CD0}.Release|Any CPU.ActiveCfg = Release|Any CPU 42 | {189AB26B-3E4E-4E1C-A1B3-79E611731CD0}.Release|Any CPU.Build.0 = Release|Any CPU 43 | {189AB26B-3E4E-4E1C-A1B3-79E611731CD0}.Release|Any CPU.Deploy.0 = Release|Any CPU 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | GlobalSection(ExtensibilityGlobals) = postSolution 49 | SolutionGuid = {85A6C315-A033-45D6-8825-9CED8F58C998} 50 | EndGlobalSection 51 | EndGlobal 52 | -------------------------------------------------------------------------------- /BlazorTemplate/BlazorTemplate.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | false 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /BlazorTemplate/Main.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |

Sorry, there's nothing at this address.

7 |
8 |
9 | -------------------------------------------------------------------------------- /BlazorTemplate/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Index 4 | 5 |

Hello, world!

6 | 7 | Welcome to your new app. -------------------------------------------------------------------------------- /BlazorTemplate/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.Web.Virtualization 7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 8 | @using Microsoft.JSInterop -------------------------------------------------------------------------------- /BlazorTemplate/wwwroot/css/app.css: -------------------------------------------------------------------------------- 1 |  2 | #blazor-error-ui { 3 | background: lightyellow; 4 | bottom: 0; 5 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 6 | display: none; 7 | left: 0; 8 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 9 | position: fixed; 10 | width: 100%; 11 | z-index: 1000; 12 | } 13 | 14 | #blazor-error-ui .dismiss { 15 | cursor: pointer; 16 | position: absolute; 17 | right: 0.75rem; 18 | top: 0.5rem; 19 | } 20 | 21 | .blazor-error-boundary { 22 | background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; 23 | padding: 1rem 1rem 1rem 3.7rem; 24 | color: white; 25 | } 26 | 27 | .blazor-error-boundary::after { 28 | content: "An error has occurred." 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Urban 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BlazorTemplate 2 | 3 | Minimal Blazor template with WASM, MAUI, WinForms and WPF projects that share the same `razor`, `cs` and `css` files in a RCL. 4 | 5 | `Index.razor`, `app.css`, `_Imports.razor` and `Main.razor` are all in RCL, only `index.html` is duplicated in the WASM, MAUI, WinForms and WPF projects. 6 | 7 | You can define all your components and pages in the RCL. --------------------------------------------------------------------------------