Browse Source

Merge pull request #33410 from dotnet/eilon/remove-windows

Remove WinForms/WPF BlazorWebView controls
Eilon Lipton 4 years ago
parent
commit
2cd96fe7c6
87 changed files with 40 additions and 3396 deletions
  1. 36 180
      AspNetCore.sln
  2. 0 9
      eng/Build.props
  3. 0 1
      eng/Dependencies.props
  4. 0 3
      eng/ProjectReferences.props
  5. 0 1
      eng/Versions.props
  6. 3 1
      src/Components/Components.slnf
  7. 1 9
      src/Components/ComponentsNoDeps.slnf
  8. 0 83
      src/Components/WebView/Platforms/WebView2/src/CoreWebView2WebResourceContextWrapper.cs
  9. 0 32
      src/Components/WebView/Platforms/WebView2/src/ICoreWebView2AcceleratorKeyPressedEventArgsWrapper.cs
  10. 0 93
      src/Components/WebView/Platforms/WebView2/src/ICoreWebView2SettingsWrapper.cs
  11. 0 38
      src/Components/WebView/Platforms/WebView2/src/ICoreWebView2WebResourceRequestWrapper.cs
  12. 0 38
      src/Components/WebView/Platforms/WebView2/src/ICoreWebView2WebResourceRequestedEventArgsWrapper.cs
  13. 0 52
      src/Components/WebView/Platforms/WebView2/src/ICoreWebView2Wrapper.cs
  14. 0 48
      src/Components/WebView/Platforms/WebView2/src/IWebView2Wrapper.cs
  15. 0 14
      src/Components/WebView/Platforms/WebView2/src/Microsoft.AspNetCore.Components.WebView.WebView2.csproj
  16. 0 1
      src/Components/WebView/Platforms/WebView2/src/PublicAPI.Shipped.txt
  17. 0 75
      src/Components/WebView/Platforms/WebView2/src/PublicAPI.Unshipped.txt
  18. 0 37
      src/Components/WebView/Platforms/WebView2/src/WebMessageReceivedEventArgs.cs
  19. 0 134
      src/Components/WebView/Platforms/WebView2/src/WebView2WebViewManager.cs
  20. 0 218
      src/Components/WebView/Platforms/WindowsForms/src/BlazorWebView.cs
  21. 0 20
      src/Components/WebView/Platforms/WindowsForms/src/Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj
  22. 0 1
      src/Components/WebView/Platforms/WindowsForms/src/PublicAPI.Shipped.txt
  23. 0 17
      src/Components/WebView/Platforms/WindowsForms/src/PublicAPI.Unshipped.txt
  24. 0 63
      src/Components/WebView/Platforms/WindowsForms/src/RootComponent.cs
  25. 0 50
      src/Components/WebView/Platforms/WindowsForms/src/RootComponentCollectionExtensions.cs
  26. 0 27
      src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2AcceleratorKeyPressedEventArgsWrapper.cs
  27. 0 64
      src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2SettingsWrapper.cs
  28. 0 29
      src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2WebResourceRequestWrapper.cs
  29. 0 33
      src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2WebResourceRequestedEventArgsWrapper.cs
  30. 0 85
      src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2Wrapper.cs
  31. 0 137
      src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsDispatcher.cs
  32. 0 61
      src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsWebView2Wrapper.cs
  33. 0 59
      src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/Form1.Designer.cs
  34. 0 25
      src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/Form1.cs
  35. 0 28
      src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/Program.cs
  36. 0 24
      src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/WinFormsTestApp.csproj
  37. 0 26
      src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/wwwroot/css/app.css
  38. 0 57
      src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/wwwroot/webviewhost.html
  39. 0 226
      src/Components/WebView/Platforms/Wpf/src/BlazorWebView.cs
  40. 0 20
      src/Components/WebView/Platforms/Wpf/src/Microsoft.AspNetCore.Components.WebView.Wpf.csproj
  41. 0 1
      src/Components/WebView/Platforms/Wpf/src/PublicAPI.Shipped.txt
  42. 0 21
      src/Components/WebView/Platforms/Wpf/src/PublicAPI.Unshipped.txt
  43. 0 57
      src/Components/WebView/Platforms/Wpf/src/RootComponent.cs
  44. 0 27
      src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2AcceleratorKeyPressedEventArgsWrapper.cs
  45. 0 64
      src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2SettingsWrapper.cs
  46. 0 29
      src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2WebResourceRequestWrapper.cs
  47. 0 33
      src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2WebResourceRequestedEventArgsWrapper.cs
  48. 0 85
      src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2Wrapper.cs
  49. 0 121
      src/Components/WebView/Platforms/Wpf/src/WpfDispatcher.cs
  50. 0 61
      src/Components/WebView/Platforms/Wpf/src/WpfWebView2Wrapper.cs
  51. 0 10
      src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/App.xaml
  52. 0 22
      src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/App.xaml.cs
  53. 0 15
      src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/MainWindow.xaml
  54. 0 25
      src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/MainWindow.xaml.cs
  55. 0 24
      src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/WpfTestApp.csproj
  56. 0 26
      src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/wwwroot/css/app.css
  57. 0 57
      src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/wwwroot/webviewhost.html
  58. 0 10
      src/Components/WebView/Samples/BlazorWinFormsApp/AppState.cs
  59. 0 24
      src/Components/WebView/Samples/BlazorWinFormsApp/BlazorWinFormsApp.csproj
  60. 0 35
      src/Components/WebView/Samples/BlazorWinFormsApp/Form1.cs
  61. 0 102
      src/Components/WebView/Samples/BlazorWinFormsApp/Form1.designer.cs
  62. 0 12
      src/Components/WebView/Samples/BlazorWinFormsApp/Main.razor
  63. 0 25
      src/Components/WebView/Samples/BlazorWinFormsApp/Pages/Index.razor
  64. 0 13
      src/Components/WebView/Samples/BlazorWinFormsApp/Pages/Other.razor
  65. 0 31
      src/Components/WebView/Samples/BlazorWinFormsApp/Program.cs
  66. 0 7
      src/Components/WebView/Samples/BlazorWinFormsApp/_Imports.razor
  67. 0 18
      src/Components/WebView/Samples/BlazorWinFormsApp/wwwroot/css/app.css
  68. 0 25
      src/Components/WebView/Samples/BlazorWinFormsApp/wwwroot/index.html
  69. 0 10
      src/Components/WebView/Samples/BlazorWpfApp/App.xaml
  70. 0 22
      src/Components/WebView/Samples/BlazorWpfApp/App.xaml.cs
  71. 0 10
      src/Components/WebView/Samples/BlazorWpfApp/AppState.cs
  72. 0 24
      src/Components/WebView/Samples/BlazorWpfApp/BlazorWpfApp.csproj
  73. 0 12
      src/Components/WebView/Samples/BlazorWpfApp/Main.razor
  74. 0 21
      src/Components/WebView/Samples/BlazorWpfApp/MainWindow.xaml
  75. 0 38
      src/Components/WebView/Samples/BlazorWpfApp/MainWindow.xaml.cs
  76. 0 26
      src/Components/WebView/Samples/BlazorWpfApp/Pages/Index.razor
  77. 0 13
      src/Components/WebView/Samples/BlazorWpfApp/Pages/Other.razor
  78. 0 7
      src/Components/WebView/Samples/BlazorWpfApp/_Imports.razor
  79. 0 18
      src/Components/WebView/Samples/BlazorWpfApp/wwwroot/css/app.css
  80. 0 25
      src/Components/WebView/Samples/BlazorWpfApp/wwwroot/index.html
  81. 0 39
      src/Components/WebView/Samples/WebviewAppShared/ExampleJsInterop.cs
  82. 0 3
      src/Components/WebView/Samples/WebviewAppShared/SharedComponent.razor
  83. 0 6
      src/Components/WebView/Samples/WebviewAppShared/SharedComponent.razor.css
  84. 0 16
      src/Components/WebView/Samples/WebviewAppShared/WebviewAppShared.csproj
  85. 0 1
      src/Components/WebView/Samples/WebviewAppShared/_Imports.razor
  86. BIN
      src/Components/WebView/Samples/WebviewAppShared/wwwroot/background.png
  87. 0 6
      src/Components/WebView/Samples/WebviewAppShared/wwwroot/exampleJsInterop.js

+ 36 - 180
AspNetCore.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.31324.12
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31320.298
 MinimumVisualStudioVersion = 15.0.26124.0
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{C28A32F6-8314-412E-9F3B-CBD31C23E878}"
 EndProject
@@ -1554,7 +1554,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InProcessNewShimWebSite", "
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BrowserTesting", "BrowserTesting", "{8F33439F-5532-45D6-8A44-20EF9104AA9D}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.BrowserTesting", "src\Shared\BrowserTesting\src\Microsoft.AspNetCore.BrowserTesting.csproj", "{B739074E-6652-4F5B-B37E-775DC2245FEC}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.BrowserTesting", "src\Shared\BrowserTesting\src\Microsoft.AspNetCore.BrowserTesting.csproj", "{B739074E-6652-4F5B-B37E-775DC2245FEC}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WasmLinkerTest", "src\Components\WebAssembly\testassets\WasmLinkerTest\WasmLinkerTest.csproj", "{3B375FFC-1E38-453E-A26D-A510CCD3339E}"
 EndProject
@@ -1570,57 +1570,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostedBlazorWebassemblyApp.
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebView", "WebView", "{C445B129-0A4D-41F5-8347-6534B6B12303}"
 EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebView", "WebView", "{DF2765A8-3836-4C3F-B199-788F732848A8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebView", "src\Components\WebView\WebView\src\Microsoft.AspNetCore.Components.WebView.csproj", "{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platforms", "Platforms", "{8B196DE0-F585-43D6-BE72-6F15BB4EB5E5}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wpf", "Wpf", "{5241CF68-66A0-4724-9BAA-36DB959A5B11}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebView.Wpf", "src\Components\WebView\Platforms\Wpf\src\Microsoft.AspNetCore.Components.WebView.Wpf.csproj", "{7858C658-1669-4A73-89FE-9D9FF682E83E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebView.Test", "src\Components\WebView\WebView\test\Microsoft.AspNetCore.Components.WebView.Test.csproj", "{4276CAB2-80BF-438A-9E01-22BAE78D4930}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{D3B76F4E-A980-45BF-AEA1-EA3175B0B5A1}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWpfApp", "src\Components\WebView\Samples\BlazorWpfApp\BlazorWpfApp.csproj", "{1E9B6311-4B68-44C9-9571-1DB0C362987D}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebView2", "WebView2", "{6685185E-C16A-4DAA-B16B-95E8FF65DE82}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebView.WebView2", "src\Components\WebView\Platforms\WebView2\src\Microsoft.AspNetCore.Components.WebView.WebView2.csproj", "{621FB2DB-2446-46CD-AB7A-189B4CB14A41}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WinForms", "WinForms", "{D4E9A2C5-0838-42DF-BC80-C829C4C9137E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebView.WindowsForms", "src\Components\WebView\Platforms\WindowsForms\src\Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj", "{3BA297F8-1CA1-492D-AE64-A60B825D8501}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWinFormsApp", "src\Components\WebView\Samples\BlazorWinFormsApp\BlazorWinFormsApp.csproj", "{CC740832-D268-47A3-9058-B9054F8397E2}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks", "src\Http\Http.Abstractions\perf\Microbenchmarks\Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks.csproj", "{3F752B48-2936-4FCA-B0DC-4AB0F788F897}"
 EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{F0849E7E-61DB-4849-9368-9E7BC125DCB0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinFormsTestApp", "src\Components\WebView\Platforms\WindowsForms\testassets\WinFormsTestApp\WinFormsTestApp.csproj", "{99EE7769-3C81-477B-B947-0A5CBCD5B27D}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{94D0D6F3-8632-41DE-908B-47A787D570FF}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfTestApp", "src\Components\WebView\Platforms\Wpf\testassets\WpfTestApp\WpfTestApp.csproj", "{036C6BDA-7B69-4E8C-A921-822DA5972A56}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebviewAppShared", "src\Components\WebView\Samples\WebviewAppShared\WebviewAppShared.csproj", "{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestStartupAssembly1", "src\Hosting\test\testassets\TestStartupAssembly1\TestStartupAssembly1.csproj", "{262FF30C-34B4-462D-B5E2-0DABB9196E40}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Spa", "Spa", "{0A064174-8E5C-4F97-B941-A4E302661DF2}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SpaProxy", "SpaProxy", "{5AC2A052-1D4F-4C2F-BCF5-3F07A3E31857}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.SpaProxy", "src\Middleware\Spa\SpaProxy\src\Microsoft.AspNetCore.SpaProxy.csproj", "{0DBACF8E-2EDB-47FC-B998-B76522637B2E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaProxy", "src\Middleware\Spa\SpaProxy\src\Microsoft.AspNetCore.SpaProxy.csproj", "{0DBACF8E-2EDB-47FC-B998-B76522637B2E}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SpaServices.Extensions", "SpaServices.Extensions", "{7F99E967-3DC1-4198-9D55-47CD9471D0B6}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.SpaServices.Extensions", "src\Middleware\Spa\SpaServices.Extensions\src\Microsoft.AspNetCore.SpaServices.Extensions.csproj", "{DF4637DA-5F07-4903-8461-4E2DAB235F3C}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices.Extensions", "src\Middleware\Spa\SpaServices.Extensions\src\Microsoft.AspNetCore.SpaServices.Extensions.csproj", "{DF4637DA-5F07-4903-8461-4E2DAB235F3C}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.SpaServices.Extensions.Tests", "src\Middleware\Spa\SpaServices.Extensions\test\Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj", "{AAB50C64-39AA-4AED-8E9C-50D68E7751AD}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices.Extensions.Tests", "src\Middleware\Spa\SpaServices.Extensions\test\Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj", "{AAB50C64-39AA-4AED-8E9C-50D68E7751AD}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MinimalSample", "src\Http\samples\MinimalSample\MinimalSample.csproj", "{9647D8B7-4616-4E05-B258-BAD5CAEEDD38}"
 EndProject
@@ -1644,6 +1608,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Featur
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Migration.E2ETests", "src\Components\test\E2ETestMigration\Microsoft.AspNetCore.Components.Migration.E2ETests.csproj", "{A1D02CE6-1077-410A-81CB-D4BD500FD765}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebView", "src\Components\WebView\WebView\src\Microsoft.AspNetCore.Components.WebView.csproj", "{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebView.Test", "src\Components\WebView\WebView\test\Microsoft.AspNetCore.Components.WebView.Test.csproj", "{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -7523,90 +7491,6 @@ Global
 		{E18EF144-9C2C-4366-B54C-09ACF7692A4F}.Release|x64.Build.0 = Release|Any CPU
 		{E18EF144-9C2C-4366-B54C-09ACF7692A4F}.Release|x86.ActiveCfg = Release|Any CPU
 		{E18EF144-9C2C-4366-B54C-09ACF7692A4F}.Release|x86.Build.0 = Release|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Debug|x64.Build.0 = Debug|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Debug|x86.Build.0 = Debug|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Release|Any CPU.Build.0 = Release|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Release|x64.ActiveCfg = Release|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Release|x64.Build.0 = Release|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Release|x86.ActiveCfg = Release|Any CPU
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E}.Release|x86.Build.0 = Release|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Debug|x64.Build.0 = Debug|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Debug|x86.Build.0 = Debug|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Release|Any CPU.Build.0 = Release|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Release|x64.ActiveCfg = Release|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Release|x64.Build.0 = Release|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Release|x86.ActiveCfg = Release|Any CPU
-		{7858C658-1669-4A73-89FE-9D9FF682E83E}.Release|x86.Build.0 = Release|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Debug|x64.Build.0 = Debug|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Debug|x86.Build.0 = Debug|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Release|Any CPU.Build.0 = Release|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Release|x64.ActiveCfg = Release|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Release|x64.Build.0 = Release|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Release|x86.ActiveCfg = Release|Any CPU
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930}.Release|x86.Build.0 = Release|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Debug|x64.Build.0 = Debug|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Debug|x86.Build.0 = Debug|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Release|Any CPU.Build.0 = Release|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Release|x64.ActiveCfg = Release|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Release|x64.Build.0 = Release|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Release|x86.ActiveCfg = Release|Any CPU
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D}.Release|x86.Build.0 = Release|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Debug|x64.Build.0 = Debug|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Debug|x86.Build.0 = Debug|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Release|Any CPU.Build.0 = Release|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Release|x64.ActiveCfg = Release|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Release|x64.Build.0 = Release|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Release|x86.ActiveCfg = Release|Any CPU
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41}.Release|x86.Build.0 = Release|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Debug|x64.Build.0 = Debug|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Debug|x86.Build.0 = Debug|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Release|Any CPU.Build.0 = Release|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Release|x64.ActiveCfg = Release|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Release|x64.Build.0 = Release|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Release|x86.ActiveCfg = Release|Any CPU
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501}.Release|x86.Build.0 = Release|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Debug|x64.Build.0 = Debug|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Debug|x86.Build.0 = Debug|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Release|Any CPU.Build.0 = Release|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Release|x64.ActiveCfg = Release|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Release|x64.Build.0 = Release|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Release|x86.ActiveCfg = Release|Any CPU
-		{CC740832-D268-47A3-9058-B9054F8397E2}.Release|x86.Build.0 = Release|Any CPU
 		{3F752B48-2936-4FCA-B0DC-4AB0F788F897}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{3F752B48-2936-4FCA-B0DC-4AB0F788F897}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{3F752B48-2936-4FCA-B0DC-4AB0F788F897}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -7619,42 +7503,6 @@ Global
 		{3F752B48-2936-4FCA-B0DC-4AB0F788F897}.Release|x64.Build.0 = Release|Any CPU
 		{3F752B48-2936-4FCA-B0DC-4AB0F788F897}.Release|x86.ActiveCfg = Release|Any CPU
 		{3F752B48-2936-4FCA-B0DC-4AB0F788F897}.Release|x86.Build.0 = Release|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Debug|x64.Build.0 = Debug|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Debug|x86.Build.0 = Debug|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Release|Any CPU.Build.0 = Release|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Release|x64.ActiveCfg = Release|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Release|x64.Build.0 = Release|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Release|x86.ActiveCfg = Release|Any CPU
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D}.Release|x86.Build.0 = Release|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Debug|x64.Build.0 = Debug|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Debug|x86.Build.0 = Debug|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Release|Any CPU.Build.0 = Release|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Release|x64.ActiveCfg = Release|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Release|x64.Build.0 = Release|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Release|x86.ActiveCfg = Release|Any CPU
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56}.Release|x86.Build.0 = Release|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Debug|x64.Build.0 = Debug|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Debug|x86.Build.0 = Debug|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Release|x64.ActiveCfg = Release|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Release|x64.Build.0 = Release|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Release|x86.ActiveCfg = Release|Any CPU
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A}.Release|x86.Build.0 = Release|Any CPU
 		{262FF30C-34B4-462D-B5E2-0DABB9196E40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{262FF30C-34B4-462D-B5E2-0DABB9196E40}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{262FF30C-34B4-462D-B5E2-0DABB9196E40}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -7811,6 +7659,30 @@ Global
 		{A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x64.Build.0 = Release|Any CPU
 		{A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x86.ActiveCfg = Release|Any CPU
 		{A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x86.Build.0 = Release|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|x64.Build.0 = Debug|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|x86.Build.0 = Debug|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Release|x64.ActiveCfg = Release|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Release|x64.Build.0 = Release|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Release|x86.ActiveCfg = Release|Any CPU
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Release|x86.Build.0 = Release|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Debug|x64.Build.0 = Debug|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Debug|x86.Build.0 = Debug|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Release|x64.ActiveCfg = Release|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Release|x64.Build.0 = Release|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Release|x86.ActiveCfg = Release|Any CPU
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -8588,25 +8460,7 @@ Global
 		{1A5582DD-06F4-4427-BFDC-B021A84A01BC} = {B4226BE2-DCB7-40C5-93F2-94C9BD6F4394}
 		{E18EF144-9C2C-4366-B54C-09ACF7692A4F} = {B4226BE2-DCB7-40C5-93F2-94C9BD6F4394}
 		{C445B129-0A4D-41F5-8347-6534B6B12303} = {60D51C98-2CC0-40DF-B338-44154EFEE2FF}
-		{DF2765A8-3836-4C3F-B199-788F732848A8} = {C445B129-0A4D-41F5-8347-6534B6B12303}
-		{35B8F997-C8BC-41C8-AA4D-5BD9F8D6069E} = {DF2765A8-3836-4C3F-B199-788F732848A8}
-		{8B196DE0-F585-43D6-BE72-6F15BB4EB5E5} = {C445B129-0A4D-41F5-8347-6534B6B12303}
-		{5241CF68-66A0-4724-9BAA-36DB959A5B11} = {8B196DE0-F585-43D6-BE72-6F15BB4EB5E5}
-		{7858C658-1669-4A73-89FE-9D9FF682E83E} = {5241CF68-66A0-4724-9BAA-36DB959A5B11}
-		{4276CAB2-80BF-438A-9E01-22BAE78D4930} = {DF2765A8-3836-4C3F-B199-788F732848A8}
-		{D3B76F4E-A980-45BF-AEA1-EA3175B0B5A1} = {C445B129-0A4D-41F5-8347-6534B6B12303}
-		{1E9B6311-4B68-44C9-9571-1DB0C362987D} = {D3B76F4E-A980-45BF-AEA1-EA3175B0B5A1}
-		{6685185E-C16A-4DAA-B16B-95E8FF65DE82} = {8B196DE0-F585-43D6-BE72-6F15BB4EB5E5}
-		{621FB2DB-2446-46CD-AB7A-189B4CB14A41} = {6685185E-C16A-4DAA-B16B-95E8FF65DE82}
-		{D4E9A2C5-0838-42DF-BC80-C829C4C9137E} = {8B196DE0-F585-43D6-BE72-6F15BB4EB5E5}
-		{3BA297F8-1CA1-492D-AE64-A60B825D8501} = {D4E9A2C5-0838-42DF-BC80-C829C4C9137E}
-		{CC740832-D268-47A3-9058-B9054F8397E2} = {D3B76F4E-A980-45BF-AEA1-EA3175B0B5A1}
 		{3F752B48-2936-4FCA-B0DC-4AB0F788F897} = {DCBBDB52-4A49-4141-8F4D-81C0FFFB7BD5}
-		{F0849E7E-61DB-4849-9368-9E7BC125DCB0} = {D4E9A2C5-0838-42DF-BC80-C829C4C9137E}
-		{99EE7769-3C81-477B-B947-0A5CBCD5B27D} = {F0849E7E-61DB-4849-9368-9E7BC125DCB0}
-		{94D0D6F3-8632-41DE-908B-47A787D570FF} = {5241CF68-66A0-4724-9BAA-36DB959A5B11}
-		{036C6BDA-7B69-4E8C-A921-822DA5972A56} = {94D0D6F3-8632-41DE-908B-47A787D570FF}
-		{64C3BAC8-C4F8-466A-9E84-0400EE54B25A} = {D3B76F4E-A980-45BF-AEA1-EA3175B0B5A1}
 		{262FF30C-34B4-462D-B5E2-0DABB9196E40} = {C1409A8F-555A-4A88-B803-C6D3E8B6C3B0}
 		{0A064174-8E5C-4F97-B941-A4E302661DF2} = {E5963C9F-20A6-4385-B364-814D2581FADF}
 		{5AC2A052-1D4F-4C2F-BCF5-3F07A3E31857} = {0A064174-8E5C-4F97-B941-A4E302661DF2}
@@ -8625,6 +8479,8 @@ Global
 		{A07D3B13-388B-444F-9E37-DDC0787C4690} = {17F28812-983E-4415-A55D-842DD7EC6887}
 		{09FFBC53-3EFF-45C4-9822-5D66089CD6AD} = {17F28812-983E-4415-A55D-842DD7EC6887}
 		{A1D02CE6-1077-410A-81CB-D4BD500FD765} = {0508E463-0269-40C9-B5C2-3B600FB2A28B}
+		{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E} = {C445B129-0A4D-41F5-8347-6534B6B12303}
+		{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5} = {C445B129-0A4D-41F5-8347-6534B6B12303}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {3E8720B3-DBDD-498C-B383-2CC32A054E8F}

+ 0 - 9
eng/Build.props

@@ -43,15 +43,6 @@
                       $(RepoRoot)src\SignalR\perf\benchmarkapps\**\*.csproj;
                       " />
 
-    <!-- Exclude WinForms and WPF-related projects on non-Windows -->
-    <ProjectToExclude Condition="'$(TargetOsName)' != 'win'"
-                      Include="
-                      $(RepoRoot)src\Components\WebView\Platforms\WindowsForms\**\*.csproj;
-                      $(RepoRoot)src\Components\WebView\Platforms\Wpf\**\*.csproj;
-                      $(RepoRoot)src\Components\WebView\Samples\BlazorWinFormsApp\**\*.csproj;
-                      $(RepoRoot)src\Components\WebView\Samples\BlazorWpfApp\**\*.csproj;
-                      " />
-
     <!-- Skipping due to build unreliability with current SDK et cetera. -->
     <ProjectToExclude Include="
                       $(RepoRoot)src/Components/test/E2ETestMigration/Microsoft.AspNetCore.Components.Migration.E2ETests.csproj" />

+ 0 - 1
eng/Dependencies.props

@@ -130,7 +130,6 @@ and are generated based on the last package release.
     <LatestPackageReference Include="Microsoft.Owin.Security.Cookies" />
     <LatestPackageReference Include="Microsoft.Owin.Testing" />
     <LatestPackageReference Include="Microsoft.Web.Administration" />
-    <LatestPackageReference Include="Microsoft.Web.WebView2" />
     <LatestPackageReference Include="Microsoft.Web.Xdt" />
     <LatestPackageReference Include="NETStandard.Library" />
     <LatestPackageReference Include="System.IdentityModel.Tokens.Jwt" />

+ 0 - 3
eng/ProjectReferences.props

@@ -150,9 +150,6 @@
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.WebAssembly.Server" ProjectPath="$(RepoRoot)src\Components\WebAssembly\Server\src\Microsoft.AspNetCore.Components.WebAssembly.Server.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" ProjectPath="$(RepoRoot)src\Components\WebAssembly\WebAssembly.Authentication\src\Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.WebAssembly" ProjectPath="$(RepoRoot)src\Components\WebAssembly\WebAssembly\src\Microsoft.AspNetCore.Components.WebAssembly.csproj" />
-    <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.WebView.WebView2" ProjectPath="$(RepoRoot)src\Components\WebView\Platforms\WebView2\src\Microsoft.AspNetCore.Components.WebView.WebView2.csproj" />
-    <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" ProjectPath="$(RepoRoot)src\Components\WebView\Platforms\WindowsForms\src\Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj" />
-    <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.WebView.Wpf" ProjectPath="$(RepoRoot)src\Components\WebView\Platforms\Wpf\src\Microsoft.AspNetCore.Components.WebView.Wpf.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.WebView" ProjectPath="$(RepoRoot)src\Components\WebView\WebView\src\Microsoft.AspNetCore.Components.WebView.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Web" ProjectPath="$(RepoRoot)src\Components\Web\src\Microsoft.AspNetCore.Components.Web.csproj" />
     <ProjectReferenceProvider Include="Microsoft.Extensions.FileProviders.Embedded" ProjectPath="$(RepoRoot)src\FileProviders\Embedded\src\Microsoft.Extensions.FileProviders.Embedded.csproj" />

+ 0 - 1
eng/Versions.props

@@ -200,7 +200,6 @@
     <MicrosoftOwinSecurityCookiesVersion>3.0.1</MicrosoftOwinSecurityCookiesVersion>
     <MicrosoftOwinTestingVersion>3.0.1</MicrosoftOwinTestingVersion>
     <MicrosoftWebAdministrationVersion>11.1.0</MicrosoftWebAdministrationVersion>
-    <MicrosoftWebWebView2Version>1.0.705.50</MicrosoftWebWebView2Version>
     <MicrosoftWebXdtVersion>1.4.0</MicrosoftWebXdtVersion>
     <SystemIdentityModelTokensJwtVersion>6.10.0</SystemIdentityModelTokensJwtVersion>
     <NuGetPackagingVersion>5.10.0-rc.7240</NuGetPackagingVersion>

+ 3 - 1
src/Components/Components.slnf

@@ -35,6 +35,8 @@
       "src\\Components\\WebAssembly\\testassets\\Wasm.Authentication.Server\\Wasm.Authentication.Server.csproj",
       "src\\Components\\WebAssembly\\testassets\\Wasm.Authentication.Shared\\Wasm.Authentication.Shared.csproj",
       "src\\Components\\WebAssembly\\testassets\\WasmLinkerTest\\WasmLinkerTest.csproj",
+      "src\\Components\\WebView\\WebView\\src\\Microsoft.AspNetCore.Components.WebView.csproj",
+      "src\\Components\\WebView\\WebView\\test\\Microsoft.AspNetCore.Components.WebView.Test.csproj",
       "src\\Components\\Web\\src\\Microsoft.AspNetCore.Components.Web.csproj",
       "src\\Components\\Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj",
       "src\\Components\\benchmarkapps\\Wasm.Performance\\Driver\\Wasm.Performance.Driver.csproj",
@@ -57,10 +59,10 @@
       "src\\Html.Abstractions\\src\\Microsoft.AspNetCore.Html.Abstractions.csproj",
       "src\\Http\\Authentication.Abstractions\\src\\Microsoft.AspNetCore.Authentication.Abstractions.csproj",
       "src\\Http\\Authentication.Core\\src\\Microsoft.AspNetCore.Authentication.Core.csproj",
+      "src\\Http\\Features\\src\\Microsoft.Extensions.Features.csproj",
       "src\\Http\\Headers\\src\\Microsoft.Net.Http.Headers.csproj",
       "src\\Http\\Http.Abstractions\\src\\Microsoft.AspNetCore.Http.Abstractions.csproj",
       "src\\Http\\Http.Extensions\\src\\Microsoft.AspNetCore.Http.Extensions.csproj",
-      "src\\Http\\Features\\src\\Microsoft.Extensions.Features.csproj",
       "src\\Http\\Http.Features\\src\\Microsoft.AspNetCore.Http.Features.csproj",
       "src\\Http\\Http\\src\\Microsoft.AspNetCore.Http.csproj",
       "src\\Http\\Routing.Abstractions\\src\\Microsoft.AspNetCore.Routing.Abstractions.csproj",

+ 1 - 9
src/Components/ComponentsNoDeps.slnf

@@ -37,14 +37,6 @@
       "src\\Components\\WebAssembly\\testassets\\Wasm.Authentication.Server\\Wasm.Authentication.Server.csproj",
       "src\\Components\\WebAssembly\\testassets\\Wasm.Authentication.Shared\\Wasm.Authentication.Shared.csproj",
       "src\\Components\\WebAssembly\\testassets\\WasmLinkerTest\\WasmLinkerTest.csproj",
-      "src\\Components\\WebView\\Platforms\\WebView2\\src\\Microsoft.AspNetCore.Components.WebView.WebView2.csproj",
-      "src\\Components\\WebView\\Platforms\\WindowsForms\\src\\Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj",
-      "src\\Components\\WebView\\Platforms\\WindowsForms\\testassets\\WinFormsTestApp\\WinFormsTestApp.csproj",
-      "src\\Components\\WebView\\Platforms\\Wpf\\src\\Microsoft.AspNetCore.Components.WebView.Wpf.csproj",
-      "src\\Components\\WebView\\Platforms\\Wpf\\testassets\\WpfTestApp\\WpfTestApp.csproj",
-      "src\\Components\\WebView\\Samples\\BlazorWinFormsApp\\BlazorWinFormsApp.csproj",
-      "src\\Components\\WebView\\Samples\\BlazorWpfApp\\BlazorWpfApp.csproj",
-      "src\\Components\\WebView\\Samples\\WebviewAppShared\\WebviewAppShared.csproj",
       "src\\Components\\WebView\\WebView\\src\\Microsoft.AspNetCore.Components.WebView.csproj",
       "src\\Components\\WebView\\WebView\\test\\Microsoft.AspNetCore.Components.WebView.Test.csproj",
       "src\\Components\\Web\\src\\Microsoft.AspNetCore.Components.Web.csproj",
@@ -61,4 +53,4 @@
       "src\\Components\\test\\testassets\\TestServer\\Components.TestServer.csproj"
     ]
   }
-}
+}

+ 0 - 83
src/Components/WebView/Platforms/WebView2/src/CoreWebView2WebResourceContextWrapper.cs

@@ -1,83 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// Specifies the web resource request contexts.
-    /// </summary>
-    public enum CoreWebView2WebResourceContextWrapper
-    {
-        /// <summary>
-        /// Specifies all resources.
-        /// </summary>
-        All,
-        /// <summary>
-        /// Specifies a document resources.
-        /// </summary>
-        Document,
-        /// <summary>
-        /// Specifies a CSS resources.
-        /// </summary>
-        Stylesheet,
-        /// <summary>
-        /// Specifies an image resources.
-        /// </summary>
-        Image,
-        /// <summary>
-        /// Specifies another media resource such as a video.
-        /// </summary>
-        Media,
-        /// <summary>
-        /// Specifies a font resource.
-        /// </summary>
-        Font,
-        /// <summary>
-        /// Specifies a script resource.
-        /// </summary>
-        Script,
-        /// <summary>
-        /// Specifies an XML HTTP request.
-        /// </summary>
-        XmlHttpRequest,
-        /// <summary>
-        /// Specifies a Fetch API communication.
-        /// </summary>
-        Fetch,
-        /// <summary>
-        /// Specifies a TextTrack resource.
-        /// </summary>
-        TextTrack,
-        /// <summary>
-        /// Specifies an EventSource API communication.
-        /// </summary>
-        EventSource,
-        /// <summary>
-        /// Specifies a WebSocket API communication.
-        /// </summary>
-        Websocket,
-        /// <summary>
-        /// Specifies a Web App Manifest.
-        /// </summary>
-        Manifest,
-        /// <summary>
-        /// Specifies a Signed HTTP Exchange.
-        /// </summary>
-        SignedExchange,
-        /// <summary>
-        /// Specifies a Ping request.
-        /// </summary>
-        Ping,
-        /// <summary>
-        /// Specifies a CSP Violation Report.
-        /// </summary>
-        CspViolationReport,
-        /// <summary>
-        /// Specifies an other resource.
-        /// </summary>
-        Other
-    }
-}

+ 0 - 32
src/Components/WebView/Platforms/WebView2/src/ICoreWebView2AcceleratorKeyPressedEventArgsWrapper.cs

@@ -1,32 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// Event args for the AcceleratorKeyPressed event.
-    /// </summary>
-    public interface ICoreWebView2AcceleratorKeyPressedEventArgsWrapper
-    {
-        /// <summary>
-        /// Gets the Win32 virtual key code of the key that was pressed or released.
-        /// </summary>
-        uint VirtualKey { get; }
-
-        /// <summary>
-        /// Gets the LPARAM value that accompanied the window message.
-        /// </summary>
-        int KeyEventLParam { get; }
-
-        /// <summary>
-        /// Indicates whether the AcceleratorKeyPressed event is handled by host.
-        /// </summary>
-        /// <remarks>
-        /// If set to <c>true</c> then this prevents the WebView from performing the default action for this accelerator key. Otherwise the WebView will perform the default action for the accelerator key.
-        /// </remarks>
-        bool Handled { get; set; }
-    }
-}

+ 0 - 93
src/Components/WebView/Platforms/WebView2/src/ICoreWebView2SettingsWrapper.cs

@@ -1,93 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// Defines properties that enable, disable, or modify WebView features.
-    /// </summary>
-    /// <remarks>
-    /// Setting changes made after <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.NavigationStarting" /> event do not apply until the next top-level navigation.
-    /// </remarks>
-    public interface ICoreWebView2SettingsWrapper
-    {
-        /// <summary>
-        /// Determines whether running JavaScript is enabled in all future navigations in the WebView.
-        /// </summary>
-        /// <remarks>
-        /// This only affects scripts in the document. Scripts injected with <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.ExecuteScriptAsync(System.String)" /> runs even if script is disabled. The default value is <c>true</c>.
-        /// </remarks>
-        public bool IsScriptEnabled { get; set; }
-
-        /// <summary>
-        /// Determines whether communication from the host to the top-level HTML document of the WebView is allowed.
-        /// </summary>
-        /// <remarks>
-        /// This is used when loading a new HTML document. If set to <c>true</c>, communication from the host to the top-level HTML document of the WebView is allowed using <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.PostWebMessageAsJson(System.String)" />, <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.PostWebMessageAsString(System.String)" />, and message event of <c>window.chrome.webview</c>. Communication from the top-level HTML document of the WebView to the host is allowed using <c>window.chrome.webview.postMessage</c> function and the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.WebMessageReceived" /> event. If set to <c>false</c>, then communication is disallowed. <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.PostWebMessageAsJson(System.String)" /> and <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.PostWebMessageAsString(System.String)" /> fail and <c>window.chrome.webview.postMessage</c> fails by throwing an instance of an Error object. The default value is <c>true</c>.
-        /// </remarks>
-        /// <seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.PostWebMessageAsJson(System.String)" />
-        /// <seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.PostWebMessageAsString(System.String)" />
-        /// <seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.WebMessageReceived" />
-        public bool IsWebMessageEnabled { get; set; }
-
-        /// <summary>
-        /// Determines whether WebView renders the default Javascript dialog box.
-        /// </summary>
-        /// <remarks>
-        /// This is used when loading a new HTML document. If set to <c>false</c>, WebView does not render the default JavaScript dialog box (specifically those displayed by the JavaScript alert, confirm, prompt functions and <c>beforeunload</c> event). Instead, WebView raises <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.ScriptDialogOpening" /> event that contains all of the information for the dialog and allow the host app to show a custom UI. The default value is <c>true</c>.
-        /// </remarks>
-        /// <seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.ScriptDialogOpening" />
-        public bool AreDefaultScriptDialogsEnabled { get; set; }
-
-        /// <summary>
-        /// Determines whether the status bar is displayed.
-        /// </summary>
-        /// <remarks>
-        /// The status bar is usually displayed in the lower left of the WebView and shows things such as the URI of a link when the user hovers over it and other information. The default value is <c>true</c>.
-        /// </remarks>
-        public bool IsStatusBarEnabled { get; set; }
-
-        /// <summary>
-        /// Determines whether the user is able to use the context menu or keyboard shortcuts to open the DevTools window.
-        /// </summary>
-        /// <remarks>
-        /// The default value is <c>true</c>.
-        /// </remarks>
-        public bool AreDevToolsEnabled { get; set; }
-
-        /// <summary>
-        /// Determines whether the default context menus are shown to the user in WebView.
-        /// </summary>
-        /// <remarks>
-        /// The default value is <c>true</c>.
-        /// </remarks>
-        public bool AreDefaultContextMenusEnabled { get; set; }
-
-        /// <summary>
-        /// Determines whether host objects are accessible from the page in WebView.
-        /// </summary>
-        /// <remarks>
-        /// The default value is <c>true</c>.
-        /// </remarks>
-        public bool AreHostObjectsAllowed { get; set; }
-
-        /// <summary>
-        /// Determines whether the user is able to impact the zoom of the WebView.
-        /// </summary>
-        /// <remarks>
-        /// When disabled, the user is not able to zoom using Ctrl++, Ctr+-, or Ctrl+mouse wheel, but the zoom is set using <see cref="P:Microsoft.Web.WebView2.Core.CoreWebView2Controller.ZoomFactor" /> property. The default value is <c>true</c>.
-        /// </remarks>
-        public bool IsZoomControlEnabled { get; set; }
-
-        /// <summary>
-        /// Determines whether to disable built in error page for navigation failure and render process failure.
-        /// </summary>
-        /// <remarks>
-        /// When disabled, blank page is displayed when related error happens. The default value is <c>true</c>.
-        /// </remarks>
-        public bool IsBuiltInErrorPageEnabled { get; set; }
-    }
-}

+ 0 - 38
src/Components/WebView/Platforms/WebView2/src/ICoreWebView2WebResourceRequestWrapper.cs

@@ -1,38 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// An HTTP request used with the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.WebResourceRequested" /> event.
-    /// </summary>
-    public interface ICoreWebView2WebResourceRequestWrapper
-    {
-        /// <summary>
-        /// Gets or sets the request URI.
-        /// </summary>
-        string Uri { get; set; }
-
-        /// <summary>
-        /// Gets or sets the HTTP request method.
-        /// </summary>
-        string Method { get; set; }
-
-        ///// <summary>
-        ///// Gets or sets the HTTP request message body as stream.
-        ///// </summary>
-        ///// <remarks>
-        ///// POST data should be here. If a stream is set, which overrides the message body, the stream must have all the content data available by the time the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.WebResourceRequested" /> event deferral of this request is completed. Stream should be agile or be created from a background STA to prevent performance impact to the UI thread. <c>null</c> means no content data.
-        ///// </remarks>
-        ///// <seealso cref="T:System.IO.Stream" />
-        //Stream Content { get; set; }
-
-        ///// <summary>
-        ///// Gets the mutable HTTP request headers.
-        ///// </summary>
-        //ICoreWebView2HttpRequestHeadersWrapper Headers { get; }
-    }
-}

+ 0 - 38
src/Components/WebView/Platforms/WebView2/src/ICoreWebView2WebResourceRequestedEventArgsWrapper.cs

@@ -1,38 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.IO;
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// Event args for the WebResourceRequested event.
-    /// </summary>
-    public interface ICoreWebView2WebResourceRequestedEventArgsWrapper
-    {
-        /// <summary>
-        /// Gets the web resource request.
-        /// </summary>
-        /// <remarks>
-        /// The request object may be missing some headers that are added by network stack at a later time.
-        /// </remarks>
-        ICoreWebView2WebResourceRequestWrapper Request { get; }
-
-        /// <summary>
-        /// Gets the web resource request context.
-        /// </summary>
-        CoreWebView2WebResourceContextWrapper ResourceContext { get; }
-
-        /// <summary>
-        /// Set the response content for this web resource.
-        /// </summary>
-        /// <param name="content"></param>
-        /// <param name="statusCode"></param>
-        /// <param name="statusMessage"></param>
-        /// <param name="headerString"></param>
-        void SetResponse(Stream content, int statusCode, string statusMessage, string headerString);
-    }
-}

+ 0 - 52
src/Components/WebView/Platforms/WebView2/src/ICoreWebView2Wrapper.cs

@@ -1,52 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// Defines an abstraction for different WebView2 implementations on different platforms.
-    /// </summary>
-    public interface ICoreWebView2Wrapper
-    {
-        /// <summary>
-        /// Gets the <see cref="ICoreWebView2SettingsWrapper" /> object contains various modifiable settings for the running WebView.
-        /// </summary>
-        public ICoreWebView2SettingsWrapper Settings { get; }
-
-        /// <summary>
-        /// Adds the provided JavaScript to a list of scripts that should be run after the global object has been created, but before the HTML document has been parsed and before any other script included by the HTML document is run.
-        /// </summary>
-        /// <param name="javaScript">The JavaScript code to be run.</param>
-        Task AddScriptToExecuteOnDocumentCreatedAsync(string javaScript);
-
-
-        /// <summary>
-        /// WebMessageReceived is raised when the IsWebMessageEnabled setting is set and the top-level document of the WebView runs <c>window.chrome.webview.postMessage</c>.
-        /// </summary>
-        Action AddWebMessageReceivedHandler(Action<WebMessageReceivedEventArgs> messageReceivedHandler);
-
-        /// <summary>
-        /// Adds a URI and resource context filter to the WebResourceRequested event.
-        /// </summary>
-        /// <param name="uri">An URI to be added to the WebResourceRequested event.</param>
-        /// <param name="resourceContext">A resource context filter to be added to the WebResourceRequested event.</param>
-        void AddWebResourceRequestedFilter(string uri, CoreWebView2WebResourceContextWrapper resourceContext);
-
-        /// <summary>
-        /// WebResourceRequested is raised when the WebView is performing a URL request to a matching URL and resource context filter that was added with AddWebResourceRequestedFilter />.
-        /// </summary>
-        Action AddWebResourceRequestedHandler(EventHandler<ICoreWebView2WebResourceRequestedEventArgsWrapper> webResourceRequestedHandler);
-
-        /// <summary>
-        /// Posts a message that is a simple <see cref="T:System.String" /> rather than a JSON string representation of a JavaScript object.
-        /// </summary>
-        /// <param name="webMessageAsString">The web message to be posted to the top level document in this WebView.</param>
-        void PostWebMessageAsString(string webMessageAsString);
-    }
-}

+ 0 - 48
src/Components/WebView/Platforms/WebView2/src/IWebView2Wrapper.cs

@@ -1,48 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// Provides an abstraction for different UI frameworks to provide access to APIs from
-    /// Microsoft.Web.WebView2.Core.CoreWebView2 and related controls.
-    /// </summary>
-    public interface IWebView2Wrapper
-    {
-        /// <summary>
-        /// Creates a WebView2 Environment using the installed or a custom WebView2 Runtime version.
-        /// The implementation should store the CoreWebView2Environment created in this method so that it can
-        /// be used in <see cref="CreateEnvironmentAsync"/>.
-        /// </summary>
-        Task CreateEnvironmentAsync();
-
-        /// <summary>
-        /// The underlying CoreWebView2. Use this property to perform more operations on the WebView2 content than is exposed
-        /// on the WebView2. This value is <c>null</c> until it is initialized. You can force the underlying CoreWebView2 to
-        /// initialize via the InitializeAsync method.
-        /// </summary>
-        ICoreWebView2Wrapper CoreWebView2 { get; }
-
-        /// <summary>
-        /// Gets or sets the source URI of the control. Setting the source URI causes page navigation.
-        /// </summary>
-        Uri Source { get; set; }
-
-        /// <summary>
-        /// Explicitly trigger initialization of the control's CoreWebView2. The implementation should use the CoreWebView2Environment that was
-        /// created in <see cref="CreateEnvironmentAsync"/>.
-        /// </summary>
-        Task EnsureCoreWebView2Async();
-
-        /// <summary>
-        /// Event that occurs when an accelerator key is pressed.
-        /// </summary>
-        Action AddAcceleratorKeyPressedHandler(EventHandler<ICoreWebView2AcceleratorKeyPressedEventArgsWrapper> eventHandler);
-    }
-}

+ 0 - 14
src/Components/WebView/Platforms/WebView2/src/Microsoft.AspNetCore.Components.WebView.WebView2.csproj

@@ -1,14 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <TargetFramework>$(DefaultNetCoreTargetFramework)-windows</TargetFramework>
-    <Description>WebView2 wrappers for BlazorWebView components on Windows.</Description>
-    <IsShippingPackage>true</IsShippingPackage>
-    <Nullable>disable</Nullable>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.WebView" />
-  </ItemGroup>
-
-</Project>

+ 0 - 1
src/Components/WebView/Platforms/WebView2/src/PublicAPI.Shipped.txt

@@ -1 +0,0 @@
-#nullable enable

+ 0 - 75
src/Components/WebView/Platforms/WebView2/src/PublicAPI.Unshipped.txt

@@ -1,75 +0,0 @@
-#nullable enable
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.All = 0 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.CspViolationReport = 15 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Document = 1 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.EventSource = 10 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Fetch = 8 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Font = 5 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Image = 3 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Manifest = 12 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Media = 4 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Other = 16 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Ping = 14 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Script = 6 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.SignedExchange = 13 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Stylesheet = 2 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.TextTrack = 9 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.Websocket = 11 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper.XmlHttpRequest = 7 -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2AcceleratorKeyPressedEventArgsWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2AcceleratorKeyPressedEventArgsWrapper.Handled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2AcceleratorKeyPressedEventArgsWrapper.Handled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2AcceleratorKeyPressedEventArgsWrapper.KeyEventLParam.get -> int
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2AcceleratorKeyPressedEventArgsWrapper.VirtualKey.get -> uint
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreDefaultContextMenusEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreDefaultContextMenusEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreDefaultScriptDialogsEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreDefaultScriptDialogsEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreDevToolsEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreDevToolsEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreHostObjectsAllowed.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.AreHostObjectsAllowed.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsBuiltInErrorPageEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsBuiltInErrorPageEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsScriptEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsScriptEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsStatusBarEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsStatusBarEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsWebMessageEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsWebMessageEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsZoomControlEnabled.get -> bool
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper.IsZoomControlEnabled.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestedEventArgsWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestedEventArgsWrapper.ResourceContext.get -> Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper
-Microsoft.AspNetCore.Components.WebView.WebView2.WebMessageReceivedEventArgs
-virtual Microsoft.AspNetCore.Components.WebView.WebView2.WebView2WebViewManager.QueueBlazorStart() -> void
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestWrapper.Method.get -> string
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestWrapper.Method.set -> void
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestWrapper.Uri.get -> string
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestWrapper.Uri.set -> void
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestedEventArgsWrapper.Request.get -> Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestWrapper
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestedEventArgsWrapper.SetResponse(System.IO.Stream content, int statusCode, string statusMessage, string headerString) -> void
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper.AddScriptToExecuteOnDocumentCreatedAsync(string javaScript) -> System.Threading.Tasks.Task
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper.AddWebMessageReceivedHandler(System.Action<Microsoft.AspNetCore.Components.WebView.WebView2.WebMessageReceivedEventArgs> messageReceivedHandler) -> System.Action
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper.AddWebResourceRequestedFilter(string uri, Microsoft.AspNetCore.Components.WebView.WebView2.CoreWebView2WebResourceContextWrapper resourceContext) -> void
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper.AddWebResourceRequestedHandler(System.EventHandler<Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2WebResourceRequestedEventArgsWrapper> webResourceRequestedHandler) -> System.Action
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper.PostWebMessageAsString(string webMessageAsString) -> void
-~Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper.Settings.get -> Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2SettingsWrapper
-~Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper.AddAcceleratorKeyPressedHandler(System.EventHandler<Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2AcceleratorKeyPressedEventArgsWrapper> eventHandler) -> System.Action
-~Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper.CoreWebView2.get -> Microsoft.AspNetCore.Components.WebView.WebView2.ICoreWebView2Wrapper
-~Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper.CreateEnvironmentAsync() -> System.Threading.Tasks.Task
-~Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper.EnsureCoreWebView2Async() -> System.Threading.Tasks.Task
-~Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper.Source.get -> System.Uri
-~Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper.Source.set -> void
-Microsoft.AspNetCore.Components.WebView.WebView2.WebView2WebViewManager
-~Microsoft.AspNetCore.Components.WebView.WebView2.WebMessageReceivedEventArgs.Source.get -> string
-~Microsoft.AspNetCore.Components.WebView.WebView2.WebMessageReceivedEventArgs.WebMessageAsString.get -> string
-~Microsoft.AspNetCore.Components.WebView.WebView2.WebMessageReceivedEventArgs.WebMessageReceivedEventArgs(string source, string webMessageAsString) -> void
-~Microsoft.AspNetCore.Components.WebView.WebView2.WebView2WebViewManager.WebView2WebViewManager(Microsoft.AspNetCore.Components.WebView.WebView2.IWebView2Wrapper webview, System.IServiceProvider services, Microsoft.AspNetCore.Components.Dispatcher dispatcher, Microsoft.Extensions.FileProviders.IFileProvider fileProvider, string hostPageRelativePath) -> void
-~override Microsoft.AspNetCore.Components.WebView.WebView2.WebView2WebViewManager.NavigateCore(System.Uri absoluteUri) -> void
-~override Microsoft.AspNetCore.Components.WebView.WebView2.WebView2WebViewManager.SendMessage(string message) -> void

+ 0 - 37
src/Components/WebView/Platforms/WebView2/src/WebMessageReceivedEventArgs.cs

@@ -1,37 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// Types in the Microsoft.AspNetCore.Components.WebView.WebView2 are not recommended for use outside
-    /// of the Blazor framework. These types will change in a future release.
-    ///
-    /// Event arguments for the WebMessageReceived event.
-    /// </summary>
-    public class WebMessageReceivedEventArgs : EventArgs
-    {
-        /// <summary>
-        /// Constructs a new instance of <see cref="WebMessageReceivedEventArgs"/> with the provider source and message.
-        /// </summary>
-        /// <param name="source">The URI of the document that sent this web message.</param>
-        /// <param name="webMessageAsString">the message posted from the WebView content to the host as a <see cref="T:System.String" />.</param>
-        public WebMessageReceivedEventArgs(string source, string webMessageAsString)
-        {
-            Source = source;
-            WebMessageAsString = webMessageAsString;
-        }
-
-        /// <summary>
-        /// Gets the URI of the document that sent this web message.
-        /// </summary>
-        public string Source { get; }
-
-        /// <summary>
-        /// Gets the message posted from the WebView content to the host as a <see cref="T:System.String" />.
-        /// </summary>
-        public string WebMessageAsString { get; }
-    }
-}

+ 0 - 134
src/Components/WebView/Platforms/WebView2/src/WebView2WebViewManager.cs

@@ -1,134 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.Extensions.FileProviders;
-
-namespace Microsoft.AspNetCore.Components.WebView.WebView2
-{
-    /// <summary>
-    /// An implementation of <see cref="WebViewManager"/> that uses the Edge WebView2 browser control
-    /// to render web content.
-    /// </summary>
-    public class WebView2WebViewManager : WebViewManager
-    {
-        // Using an IP address means that WebView2 doesn't wait for any DNS resolution,
-        // making it substantially faster. Note that this isn't real HTTP traffic, since
-        // we intercept all the requests within this origin.
-        private const string AppOrigin = "https://0.0.0.0/";
-
-        private readonly IWebView2Wrapper _webview;
-        private readonly Task _webviewReadyTask;
-
-        /// <summary>
-        /// Constructs an instance of <see cref="WebView2WebViewManager"/>.
-        /// </summary>
-        /// <param name="webview">A wrapper to access platform-specific WebView2 APIs.</param>
-        /// <param name="services">A service provider containing services to be used by this class and also by application code.</param>
-        /// <param name="dispatcher">A <see cref="Dispatcher"/> instance that can marshal calls to the required thread or sync context.</param>
-        /// <param name="fileProvider">Provides static content to the webview.</param>
-        /// <param name="hostPageRelativePath">Path to the host page within the <paramref name="fileProvider"/>.</param>
-        public WebView2WebViewManager(IWebView2Wrapper webview, IServiceProvider services, Dispatcher dispatcher, IFileProvider fileProvider, string hostPageRelativePath)
-            : base(services, dispatcher, new Uri(AppOrigin), fileProvider, hostPageRelativePath)
-        {
-            _webview = webview ?? throw new ArgumentNullException(nameof(webview));
-
-            // Unfortunately the CoreWebView2 can only be instantiated asynchronously.
-            // We want the external API to behave as if initalization is synchronous,
-            // so keep track of a task we can await during LoadUri.
-            _webviewReadyTask = InitializeWebView2();
-        }
-
-        /// <inheritdoc />
-        protected override void NavigateCore(Uri absoluteUri)
-        {
-            _ = Dispatcher.InvokeAsync(async () =>
-            {
-                await _webviewReadyTask;
-                _webview.Source = absoluteUri;
-            });
-        }
-
-        /// <inheritdoc />
-        protected override void SendMessage(string message)
-            => _webview.CoreWebView2.PostWebMessageAsString(message);
-
-        private async Task InitializeWebView2()
-        {
-            await _webview.CreateEnvironmentAsync().ConfigureAwait(true);
-            await _webview.EnsureCoreWebView2Async();
-            ApplyDefaultWebViewSettings();
-
-            _webview.CoreWebView2.AddWebResourceRequestedFilter($"{AppOrigin}*", CoreWebView2WebResourceContextWrapper.All);
-            var removeResourceCallback = _webview.CoreWebView2.AddWebResourceRequestedHandler((s, eventArgs) =>
-            {
-                // Unlike server-side code, we get told exactly why the browser is making the request,
-                // so we can be smarter about fallback. We can ensure that 'fetch' requests never result
-                // in fallback, for example.
-                var allowFallbackOnHostPage =
-                    eventArgs.ResourceContext == CoreWebView2WebResourceContextWrapper.Document ||
-                    eventArgs.ResourceContext == CoreWebView2WebResourceContextWrapper.Other; // e.g., dev tools requesting page source
-
-                if (TryGetResponseContent(eventArgs.Request.Uri, allowFallbackOnHostPage, out var statusCode, out var statusMessage, out var content, out var headers))
-                {
-                    var headerString = GetHeaderString(headers);
-                    eventArgs.SetResponse(content, statusCode, statusMessage, headerString);
-                }
-            });
-
-            // The code inside blazor.webview.js is meant to be agnostic to specific webview technologies,
-            // so the following is an adaptor from blazor.webview.js conventions to WebView2 APIs
-            await _webview.CoreWebView2.AddScriptToExecuteOnDocumentCreatedAsync(@"
-                window.external = {
-                    sendMessage: message => {
-                        window.chrome.webview.postMessage(message);
-                    },
-                    receiveMessage: callback => {
-                        window.chrome.webview.addEventListener('message', e => callback(e.data));
-                    }
-                };
-            ").ConfigureAwait(true);
-
-            QueueBlazorStart();
-
-            var removeMessageCallback = _webview.CoreWebView2.AddWebMessageReceivedHandler(e
-                => MessageReceived(new Uri(e.Source), e.WebMessageAsString));
-        }
-
-        /// <summary>
-        /// Override this method to queue a call to Blazor.start(). Not all platforms require this.
-        /// </summary>
-        protected virtual void QueueBlazorStart()
-        {
-        }
-
-        private static string GetHeaderString(IDictionary<string, string> headers) =>
-            string.Join(Environment.NewLine, headers.Select(kvp => $"{kvp.Key}: {kvp.Value}"));
-
-        private void ApplyDefaultWebViewSettings()
-        {
-            // Desktop applications typically don't want the default web browser context menu
-            _webview.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false;
-
-            // Desktop applications almost never want to show a URL preview when hovering over a link
-            _webview.CoreWebView2.Settings.IsStatusBarEnabled = false;
-
-            // Desktop applications don't normally want to enable things like "alt-left to go back"
-            // or "ctrl+f to find". Developers should explicitly opt into allowing these.
-            // Issues #30511 and #30624 track making an option to control this.
-            var removeKeyPressCallback = _webview.AddAcceleratorKeyPressedHandler((sender, eventArgs) =>
-            {
-                if (eventArgs.VirtualKey != 0x49) // Allow ctrl+shift+i to open dev tools, at least for now
-                {
-                    // Note: due to what seems like a bug (https://github.com/MicrosoftEdge/WebView2Feedback/issues/549),
-                    // setting eventArgs.Handled doesn't actually have any effect in WPF, even though it works fine in
-                    // WinForms. Leaving the code here because it's supposedly fixed in a newer version.
-                    eventArgs.Handled = true;
-                }
-            });
-        }
-    }
-}

+ 0 - 218
src/Components/WebView/Platforms/WindowsForms/src/BlazorWebView.cs

@@ -1,218 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Windows.Forms;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Extensions.FileProviders;
-using WebView2Control = Microsoft.Web.WebView2.WinForms.WebView2;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    /// <summary>
-    /// A Windows Forms control for hosting Blazor web components locally in Windows desktop applications.
-    /// </summary>
-    public sealed class BlazorWebView : ContainerControl, IDisposable
-    {
-        private readonly WebView2Control _webview;
-        private WebView2WebViewManager _webviewManager;
-        private string _hostPage;
-        private IServiceProvider _services;
-
-        /// <summary>
-        /// Creates a new instance of <see cref="BlazorWebView"/>.
-        /// </summary>
-        public BlazorWebView()
-        {
-            Dispatcher = new WindowsFormsDispatcher(this);
-            RootComponents.CollectionChanged += HandleRootComponentsCollectionChanged;
-
-            _webview = new WebView2Control()
-            {
-                Dock = DockStyle.Fill,
-            };
-            ((BlazorWebViewControlCollection)Controls).AddInternal(_webview);
-        }
-
-        /// <summary>
-        /// Returns the inner <see cref="WebView2Control"/> used by this control.
-        /// </summary>
-        /// <remarks>
-        /// Directly using some functionality of the inner web view can cause unexpected results because its behavior
-        /// is controlled by the <see cref="BlazorWebView"/> that is hosting it.
-        /// </remarks>
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public WebView2Control WebView => _webview;
-
-        private WindowsFormsDispatcher Dispatcher { get; }
-
-        /// <inheritdoc />
-        protected override void OnCreateControl()
-        {
-            base.OnCreateControl();
-
-            StartWebViewCoreIfPossible();
-        }
-
-        /// <summary>
-        /// Path to the host page within the application's static files. For example, <code>wwwroot\index.html</code>.
-        /// This property must be set to a valid value for the Blazor components to start.
-        /// </summary>
-        [Category("Behavior")]
-        [Description(@"Path to the host page within the application's static files. Example: wwwroot\index.html.")]
-        public string HostPage
-        {
-            get => _hostPage;
-            set
-            {
-                _hostPage = value;
-                OnHostPagePropertyChanged();
-            }
-        }
-
-        // Learn more about these methods here: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/defining-default-values-with-the-shouldserialize-and-reset-methods?view=netframeworkdesktop-4.8
-        private void ResetHostPage() => HostPage = null;
-        private bool ShouldSerializeHostPage() => !string.IsNullOrEmpty(HostPage);
-
-        /// <summary>
-        /// A collection of <see cref="RootComponent"/> instances that specify the Blazor <see cref="IComponent"/> types
-        /// to be used directly in the specified <see cref="HostPage"/>.
-        /// </summary>
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public ObservableCollection<RootComponent> RootComponents { get; } = new();
-
-        /// <summary>
-        /// Gets or sets an <see cref="IServiceProvider"/> containing services to be used by this control and also by application code.
-        /// This property must be set to a valid value for the Blazor components to start.
-        /// </summary>
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public IServiceProvider Services
-        {
-            get => _services;
-            set
-            {
-                _services = value;
-                OnServicesPropertyChanged();
-            }
-        }
-
-        private void OnHostPagePropertyChanged() => StartWebViewCoreIfPossible();
-
-        private void OnServicesPropertyChanged() => StartWebViewCoreIfPossible();
-
-        private bool IsAncestorSiteInDesignMode =>
-            GetSitedParentSite(this) is ISite parentSite && parentSite.DesignMode;
-
-        private ISite GetSitedParentSite(Control control) =>
-            control is null
-                ? throw new ArgumentNullException(nameof(control))
-                : control.Site != null || control.Parent is null
-                    ? control.Site
-                    : GetSitedParentSite(control.Parent);
-
-        private bool RequiredStartupPropertiesSet =>
-            Created &&
-            _webview != null &&
-            HostPage != null &&
-            Services != null;
-
-        private void StartWebViewCoreIfPossible()
-        {
-            // We never start the Blazor code in design time because it doesn't make sense to run
-            // a Blazor component in the designer.
-            if (!IsAncestorSiteInDesignMode && (!RequiredStartupPropertiesSet || _webviewManager != null))
-            {
-                return;
-            }
-
-            // We assume the host page is always in the root of the content directory, because it's
-            // unclear there's any other use case. We can add more options later if so.
-            var contentRootDir = Path.GetDirectoryName(Path.GetFullPath(HostPage));
-            var hostPageRelativePath = Path.GetRelativePath(contentRootDir, HostPage);
-            var fileProvider = new PhysicalFileProvider(contentRootDir);
-
-            _webviewManager = new WebView2WebViewManager(new WindowsFormsWebView2Wrapper(_webview), Services, Dispatcher, fileProvider, hostPageRelativePath);
-            foreach (var rootComponent in RootComponents)
-            {
-                // Since the page isn't loaded yet, this will always complete synchronously
-                _ = rootComponent.AddToWebViewManagerAsync(_webviewManager);
-            }
-            _webviewManager.Navigate("/");
-        }
-
-        private void HandleRootComponentsCollectionChanged(object sender, NotifyCollectionChangedEventArgs eventArgs)
-        {
-            // If we haven't initialized yet, this is a no-op
-            if (_webviewManager != null)
-            {
-                // Dispatch because this is going to be async, and we want to catch any errors
-                _ = Dispatcher.InvokeAsync(async () =>
-                {
-                    var newItems = eventArgs.NewItems.Cast<RootComponent>();
-                    var oldItems = eventArgs.OldItems.Cast<RootComponent>();
-
-                    foreach (var item in newItems.Except(oldItems))
-                    {
-                        await item.AddToWebViewManagerAsync(_webviewManager);
-                    }
-
-                    foreach (var item in oldItems.Except(newItems))
-                    {
-                        await item.RemoveFromWebViewManagerAsync(_webviewManager);
-                    }
-                });
-            }
-        }
-
-        /// <inheritdoc />
-        protected override void Dispose(bool disposing)
-        {
-            base.Dispose(disposing);
-
-            if (disposing)
-            {
-                _webviewManager?.Dispose();
-                _webview?.Dispose();
-            }
-        }
-
-        /// <inheritdoc />
-        protected override ControlCollection CreateControlsInstance()
-        {
-            return new BlazorWebViewControlCollection(this);
-        }
-
-        /// <summary>
-        /// Custom control collection that ensures that only the owning <see cref="BlazorWebView"/> can add
-        /// controls to it.
-        /// </summary>
-        private sealed class BlazorWebViewControlCollection : ControlCollection
-        {
-            public BlazorWebViewControlCollection(BlazorWebView owner) : base(owner)
-            {
-            }
-
-            /// <summary>
-            /// This is the only API we use; everything else is blocked.
-            /// </summary>
-            /// <param name="value"></param>
-            internal void AddInternal(Control value) => base.Add(value);
-
-            // Everything below is overridden to protect the control collection as read-only.
-            public override bool IsReadOnly => true;
-
-            public override void Add(Control value) => throw new NotSupportedException();
-            public override void Clear() => throw new NotSupportedException();
-            public override void Remove(Control value) => throw new NotSupportedException();
-            public override void SetChildIndex(Control child, int newIndex) => throw new NotSupportedException();
-        }
-    }
-}

+ 0 - 20
src/Components/WebView/Platforms/WindowsForms/src/Microsoft.AspNetCore.Components.WebView.WindowsForms.csproj

@@ -1,20 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <!-- Use TargetFrameworks (plural) instead of TargetFramework (singular) here even though there is only one target
-      framework. This is to work around an issue with the Microsoft.Web.WebView2 package:
-      https://github.com/MicrosoftEdge/WebView2Feedback/issues/710 -->
-    <TargetFrameworks>$(DefaultNetCoreTargetFramework)-windows</TargetFrameworks>
-    <Description>Build Windows Forms applications with Blazor and WebView2.</Description>
-    <UseWindowsForms>true</UseWindowsForms>
-    <IsShippingPackage>true</IsShippingPackage>
-    <Nullable>disable</Nullable>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.WebView" />
-    <Reference Include="Microsoft.AspNetCore.Components.WebView.WebView2" />
-    <Reference Include="Microsoft.Web.WebView2" />
-  </ItemGroup>
-
-</Project>

+ 0 - 1
src/Components/WebView/Platforms/WindowsForms/src/PublicAPI.Shipped.txt

@@ -1 +0,0 @@
-#nullable enable

+ 0 - 17
src/Components/WebView/Platforms/WindowsForms/src/PublicAPI.Unshipped.txt

@@ -1,17 +0,0 @@
-#nullable enable
-Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView
-Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView.BlazorWebView() -> void
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView.HostPage.get -> string
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView.HostPage.set -> void
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView.RootComponents.get -> System.Collections.ObjectModel.ObservableCollection<Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent>
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView.Services.get -> System.IServiceProvider
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView.Services.set -> void
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView.WebView.get -> Microsoft.Web.WebView2.WinForms.WebView2
-Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent.ComponentType.get -> System.Type
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent.Parameters.get -> System.Collections.Generic.IDictionary<string, object>
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent.RootComponent(string selector, System.Type componentType, System.Collections.Generic.IDictionary<string, object> parameters) -> void
-~Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent.Selector.get -> string
-Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponentCollectionExtensions
-~static Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponentCollectionExtensions.Add<TComponent>(this System.Collections.ObjectModel.ObservableCollection<Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent> components, string selector, System.Collections.Generic.IDictionary<string, object> parameters = null) -> void
-~static Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponentCollectionExtensions.Remove(this System.Collections.ObjectModel.ObservableCollection<Microsoft.AspNetCore.Components.WebView.WindowsForms.RootComponent> components, string selector) -> void

+ 0 - 63
src/Components/WebView/Platforms/WindowsForms/src/RootComponent.cs

@@ -1,63 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-using WebView2Control = Microsoft.Web.WebView2.WinForms.WebView2;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    /// <summary>
-    /// Describes a root component that can be added to a <see cref="BlazorWebView"/>.
-    /// </summary>
-    public class RootComponent
-    {
-        /// <summary>
-        /// Constructs an instance of <see cref="RootComponent"/>.
-        /// </summary>
-        /// <param name="selector">The CSS selector string that specifies where in the document the component should be placed. This must be unique among the root components within the <see cref="BlazorWebView"/>.</param>
-        /// <param name="componentType">The type of the root component. This type must implement <see cref="IComponent"/>.</param>
-        /// <param name="parameters">An optional dictionary of parameters to pass to the root component.</param>
-        public RootComponent(string selector, Type componentType, IDictionary<string, object> parameters)
-        {
-            if (string.IsNullOrWhiteSpace(selector))
-            {
-                throw new ArgumentException($"'{nameof(selector)}' cannot be null or whitespace.", nameof(selector));
-            }
-
-            Selector = selector;
-            ComponentType = componentType ?? throw new ArgumentNullException(nameof(componentType));
-            Parameters = parameters;
-        }
-
-        /// <summary>
-        /// Gets the CSS selector string that specifies where in the document the component should be placed.
-        /// This must be unique among the root components within the <see cref="BlazorWebView"/>.
-        /// </summary>
-        public string Selector { get; }
-
-        /// <summary>
-        /// Gets the type of the root component. This type must implement <see cref="IComponent"/>.
-        /// </summary>
-        public Type ComponentType { get; }
-
-        /// <summary>
-        /// Gets an optional dictionary of parameters to pass to the root component.
-        /// </summary>
-        public IDictionary<string, object> Parameters { get; }
-
-        internal Task AddToWebViewManagerAsync(WebViewManager webViewManager)
-        {
-            var parameterView = Parameters == null ? ParameterView.Empty : ParameterView.FromDictionary(Parameters);
-            return webViewManager.AddRootComponentAsync(ComponentType, Selector, parameterView);
-        }
-
-        internal Task RemoveFromWebViewManagerAsync(WebView2WebViewManager webviewManager)
-        {
-            return webviewManager.RemoveRootComponentAsync(Selector);
-        }
-    }
-}

+ 0 - 50
src/Components/WebView/Platforms/WindowsForms/src/RootComponentCollectionExtensions.cs

@@ -1,50 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    /// <summary>
-    /// Provides a set of extension methods for modifying collections of <see cref="IComponent"/> objects.
-    /// </summary>
-    public static class RootComponentCollectionExtensions
-    {
-        /// <summary>
-        /// Adds the component specified by <typeparamref name="TComponent"/> to the collection specified by
-        /// <paramref name="components" /> to be associated with the selector specified by <paramref name="selector"/>
-        /// and to be instantiated with the parameters specified by <paramref name="parameters"/>.
-        /// </summary>
-        /// <typeparam name="TComponent">The <see cref="IComponent"/> to add to the collection.</typeparam>
-        /// <param name="components">The collection to which the component should be added.</param>
-        /// <param name="selector">The selector to which the component will be associated.</param>
-        /// <param name="parameters">The optional creation parameters for the component.</param>
-        public static void Add<TComponent>(this ObservableCollection<RootComponent> components, string selector, IDictionary<string, object> parameters = null)
-            where TComponent : IComponent
-        {
-            components.Add(new RootComponent(selector, typeof(TComponent), parameters));
-        }
-
-        /// <summary>
-        /// Removes the component associated with the specified <paramref name="selector"/> from the collection
-        /// specified by <paramref name="components" /> .
-        /// </summary>
-        /// <param name="components">The collection from which the component associated with the selector should be removed.</param>
-        /// <param name="selector">The selector associated with the component to be removed.</param>
-        public static void Remove(this ObservableCollection<RootComponent> components, string selector)
-        {
-            for (var i = 0; i < components.Count; i++)
-            {
-                if (components[i].Selector.Equals(selector, StringComparison.Ordinal))
-                {
-                    components.RemoveAt(i);
-                    return;
-                }
-            }
-
-            throw new ArgumentException($"There is no root component with selector '{selector}'.", nameof(selector));
-        }
-    }
-}

+ 0 - 27
src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2AcceleratorKeyPressedEventArgsWrapper.cs

@@ -1,27 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    internal class WindowsFormsCoreWebView2AcceleratorKeyPressedEventArgsWrapper : ICoreWebView2AcceleratorKeyPressedEventArgsWrapper
-    {
-        private readonly CoreWebView2AcceleratorKeyPressedEventArgs _eventArgs;
-
-        public WindowsFormsCoreWebView2AcceleratorKeyPressedEventArgsWrapper(CoreWebView2AcceleratorKeyPressedEventArgs eventArgs)
-        {
-            _eventArgs = eventArgs;
-        }
-        public uint VirtualKey => _eventArgs.VirtualKey;
-
-        public int KeyEventLParam => _eventArgs.KeyEventLParam;
-
-        public bool Handled
-        {
-            get => _eventArgs.Handled;
-            set => _eventArgs.Handled = value;
-        }
-    }
-}

+ 0 - 64
src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2SettingsWrapper.cs

@@ -1,64 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    internal class WindowsFormsCoreWebView2SettingsWrapper : ICoreWebView2SettingsWrapper
-    {
-        private readonly CoreWebView2Settings _settings;
-
-        public WindowsFormsCoreWebView2SettingsWrapper(CoreWebView2Settings settings)
-        {
-            _settings = settings;
-        }
-
-        public bool IsScriptEnabled
-        {
-            get => _settings.IsScriptEnabled;
-            set => _settings.IsScriptEnabled = value;
-        }
-        public bool IsWebMessageEnabled
-        {
-            get => _settings.IsWebMessageEnabled;
-            set => _settings.IsWebMessageEnabled = value;
-        }
-        public bool AreDefaultScriptDialogsEnabled
-        {
-            get => _settings.AreDefaultScriptDialogsEnabled;
-            set => _settings.AreDefaultScriptDialogsEnabled = value;
-        }
-        public bool IsStatusBarEnabled
-        {
-            get => _settings.IsStatusBarEnabled;
-            set => _settings.IsStatusBarEnabled = value;
-        }
-        public bool AreDevToolsEnabled
-        {
-            get => _settings.AreDevToolsEnabled;
-            set => _settings.AreDevToolsEnabled = value;
-        }
-        public bool AreDefaultContextMenusEnabled
-        {
-            get => _settings.AreDefaultContextMenusEnabled;
-            set => _settings.AreDefaultContextMenusEnabled = value;
-        }
-        public bool AreHostObjectsAllowed
-        {
-            get => _settings.AreHostObjectsAllowed;
-            set => _settings.AreHostObjectsAllowed = value;
-        }
-        public bool IsZoomControlEnabled
-        {
-            get => _settings.IsZoomControlEnabled;
-            set => _settings.IsZoomControlEnabled = value;
-        }
-        public bool IsBuiltInErrorPageEnabled
-        {
-            get => _settings.IsBuiltInErrorPageEnabled;
-            set => _settings.IsBuiltInErrorPageEnabled = value;
-        }
-    }
-}

+ 0 - 29
src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2WebResourceRequestWrapper.cs

@@ -1,29 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    internal class WindowsFormsCoreWebView2WebResourceRequestWrapper : ICoreWebView2WebResourceRequestWrapper
-    {
-        private readonly CoreWebView2WebResourceRequestedEventArgs _webResourceRequestedEventArgs;
-
-        public WindowsFormsCoreWebView2WebResourceRequestWrapper(CoreWebView2WebResourceRequestedEventArgs webResourceRequestedEventArgs)
-        {
-            _webResourceRequestedEventArgs = webResourceRequestedEventArgs;
-        }
-
-        public string Uri
-        {
-            get => _webResourceRequestedEventArgs.Request.Uri;
-            set => _webResourceRequestedEventArgs.Request.Uri = value;
-        }
-        public string Method
-        {
-            get => _webResourceRequestedEventArgs.Request.Method;
-            set => _webResourceRequestedEventArgs.Request.Method = value;
-        }
-    }
-}

+ 0 - 33
src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2WebResourceRequestedEventArgsWrapper.cs

@@ -1,33 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.IO;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    internal class WindowsFormsCoreWebView2WebResourceRequestedEventArgsWrapper : ICoreWebView2WebResourceRequestedEventArgsWrapper
-    {
-        private readonly CoreWebView2Environment _environment;
-        private readonly CoreWebView2WebResourceRequestedEventArgs _webResourceRequestedEventArgs;
-
-        public WindowsFormsCoreWebView2WebResourceRequestedEventArgsWrapper(CoreWebView2Environment environment, CoreWebView2WebResourceRequestedEventArgs webResourceRequestedEventArgs)
-        {
-            _environment = environment;
-            _webResourceRequestedEventArgs = webResourceRequestedEventArgs;
-
-            Request = new WindowsFormsCoreWebView2WebResourceRequestWrapper(webResourceRequestedEventArgs);
-            ResourceContext = (CoreWebView2WebResourceContextWrapper)webResourceRequestedEventArgs.ResourceContext;
-        }
-
-        public ICoreWebView2WebResourceRequestWrapper Request { get; }
-
-        public CoreWebView2WebResourceContextWrapper ResourceContext { get; }
-
-        public void SetResponse(Stream content, int statusCode, string statusMessage, string headerString)
-        {
-            _webResourceRequestedEventArgs.Response = _environment.CreateWebResourceResponse(content, statusCode, statusMessage, headerString);
-        }
-    }
-}

+ 0 - 85
src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsCoreWebView2Wrapper.cs

@@ -1,85 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    internal class WindowsFormsCoreWebView2Wrapper : ICoreWebView2Wrapper
-    {
-        private readonly WindowsFormsWebView2Wrapper _webView2;
-        private WindowsFormsCoreWebView2SettingsWrapper _settings;
-
-        public WindowsFormsCoreWebView2Wrapper(WindowsFormsWebView2Wrapper webView2)
-        {
-            if (webView2 is null)
-            {
-                throw new ArgumentNullException(nameof(webView2));
-            }
-
-            _webView2 = webView2;
-        }
-
-        public ICoreWebView2SettingsWrapper Settings
-        {
-            get
-            {
-                if (_settings == null)
-                {
-                    _settings = new WindowsFormsCoreWebView2SettingsWrapper(_webView2.WebView2.CoreWebView2.Settings);
-                }
-                return _settings;
-            }
-        }
-
-        public Task AddScriptToExecuteOnDocumentCreatedAsync(string javaScript)
-        {
-            return _webView2.WebView2.CoreWebView2.AddScriptToExecuteOnDocumentCreatedAsync(javaScript);
-        }
-
-        public Action AddWebMessageReceivedHandler(Action<WebMessageReceivedEventArgs> messageReceivedHandler)
-        {
-            void nativeEventHandler(object sender, CoreWebView2WebMessageReceivedEventArgs e)
-            {
-                messageReceivedHandler(new WebMessageReceivedEventArgs(e.Source, e.TryGetWebMessageAsString()));
-            }
-
-            _webView2.WebView2.CoreWebView2.WebMessageReceived += nativeEventHandler;
-
-            // Return removal callback
-            return () =>
-            {
-                _webView2.WebView2.CoreWebView2.WebMessageReceived -= nativeEventHandler;
-            };
-        }
-
-        public void AddWebResourceRequestedFilter(string uri, CoreWebView2WebResourceContextWrapper resourceContext)
-        {
-            _webView2.WebView2.CoreWebView2.AddWebResourceRequestedFilter(uri, (CoreWebView2WebResourceContext)resourceContext);
-        }
-
-        public Action AddWebResourceRequestedHandler(EventHandler<ICoreWebView2WebResourceRequestedEventArgsWrapper> webResourceRequestedHandler)
-        {
-            void nativeEventHandler(object sender, CoreWebView2WebResourceRequestedEventArgs e)
-            {
-                webResourceRequestedHandler(_webView2.WebView2, new WindowsFormsCoreWebView2WebResourceRequestedEventArgsWrapper(_webView2.Environment, e));
-            }
-
-            _webView2.WebView2.CoreWebView2.WebResourceRequested += nativeEventHandler;
-
-            // Return removal callback
-            return () =>
-            {
-                _webView2.WebView2.CoreWebView2.WebResourceRequested -= nativeEventHandler;
-            };
-        }
-
-        public void PostWebMessageAsString(string webMessageAsString)
-        {
-            _webView2.WebView2.CoreWebView2.PostWebMessageAsString(webMessageAsString);
-        }
-    }
-}

+ 0 - 137
src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsDispatcher.cs

@@ -1,137 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Runtime.ExceptionServices;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    /// <summary>
-    /// Dispatcher implementation for Windows Forms that invokes methods on the UI thread. The <see cref="Dispatcher"/>
-    /// class uses the async <see cref="Task"/> pattern so everything must be mapped from the <see cref="IAsyncResult"/>
-    /// pattern using techniques listed in https://docs.microsoft.com/dotnet/standard/asynchronous-programming-patterns/interop-with-other-asynchronous-patterns-and-types.
-    /// </summary>
-    internal class WindowsFormsDispatcher : Dispatcher
-    {
-        private static Action<Exception> RethrowException = exception =>
-            ExceptionDispatchInfo.Capture(exception).Throw();
-        private readonly Control _dispatchThreadControl;
-
-        /// <summary>
-        /// Creates a new instance of <see cref="WindowsFormsDispatcher"/>.
-        /// </summary>
-        /// <param name="dispatchThreadControl">A control that was created on the thread from which UI dispatches must
-        /// occur. This can typically be any control because all controls must have been created on the UI thread to
-        /// begin with.</param>
-        public WindowsFormsDispatcher(Control dispatchThreadControl)
-        {
-            if (dispatchThreadControl is null)
-            {
-                throw new ArgumentNullException(nameof(dispatchThreadControl));
-            }
-
-            _dispatchThreadControl = dispatchThreadControl;
-        }
-
-        public override bool CheckAccess()
-            => !_dispatchThreadControl.InvokeRequired;
-
-        public override async Task InvokeAsync(Action workItem)
-        {
-            try
-            {
-                if (CheckAccess())
-                {
-                    workItem();
-                }
-                else
-                {
-                    var asyncResult = _dispatchThreadControl.BeginInvoke(workItem);
-                    await Task.Factory.FromAsync(asyncResult, _dispatchThreadControl.EndInvoke);
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _dispatchThreadControl.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-
-        public override async Task InvokeAsync(Func<Task> workItem)
-        {
-            try
-            {
-                if (CheckAccess())
-                {
-                    await workItem();
-                }
-                else
-                {
-                    var asyncResult = _dispatchThreadControl.BeginInvoke(workItem);
-                    await Task.Factory.FromAsync(asyncResult, _dispatchThreadControl.EndInvoke);
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _dispatchThreadControl.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-
-        public override async Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem)
-        {
-            try
-            {
-                if (CheckAccess())
-                {
-                    return workItem();
-                }
-                else
-                {
-                    var asyncResult = _dispatchThreadControl.BeginInvoke(workItem);
-                    return await Task<TResult>.Factory.FromAsync(asyncResult, result => (TResult)_dispatchThreadControl.EndInvoke(result));
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _dispatchThreadControl.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-
-        public override async Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
-        {
-            try
-            {
-                if (CheckAccess())
-                {
-                    return await workItem();
-                }
-                else
-                {
-                    var asyncResult = _dispatchThreadControl.BeginInvoke(workItem);
-                    return await Task<TResult>.Factory.FromAsync(asyncResult, result => (TResult)_dispatchThreadControl.EndInvoke(result));
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _dispatchThreadControl.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-    }
-}

+ 0 - 61
src/Components/WebView/Platforms/WindowsForms/src/WindowsFormsWebView2Wrapper.cs

@@ -1,61 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-using WebView2Control = Microsoft.Web.WebView2.WinForms.WebView2;
-
-namespace Microsoft.AspNetCore.Components.WebView.WindowsForms
-{
-    internal class WindowsFormsWebView2Wrapper : IWebView2Wrapper
-    {
-        private readonly WindowsFormsCoreWebView2Wrapper _coreWebView2Wrapper;
-
-        public WindowsFormsWebView2Wrapper(WebView2Control webView2)
-        {
-            if (webView2 is null)
-            {
-                throw new ArgumentNullException(nameof(webView2));
-            }
-
-            WebView2 = webView2;
-            _coreWebView2Wrapper = new WindowsFormsCoreWebView2Wrapper(this);
-        }
-
-        public ICoreWebView2Wrapper CoreWebView2 => _coreWebView2Wrapper;
-
-        public Uri Source
-        {
-            get => WebView2.Source;
-            set => WebView2.Source = value;
-        }
-
-        public WebView2Control WebView2 { get; }
-
-        public CoreWebView2Environment Environment { get; set; }
-
-        public Action AddAcceleratorKeyPressedHandler(EventHandler<ICoreWebView2AcceleratorKeyPressedEventArgsWrapper> eventHandler)
-        {
-            EventHandler<CoreWebView2AcceleratorKeyPressedEventArgs> realHandler = (object sender, CoreWebView2AcceleratorKeyPressedEventArgs e) =>
-            {
-                eventHandler(WebView2, new WindowsFormsCoreWebView2AcceleratorKeyPressedEventArgsWrapper(e));
-            };
-            WebView2.AcceleratorKeyPressed += realHandler;
-
-            // Return removal callback
-            return () => { WebView2.AcceleratorKeyPressed -= realHandler; };
-        }
-
-        public async Task CreateEnvironmentAsync()
-        {
-            Environment = await CoreWebView2Environment.CreateAsync();
-        }
-
-        public Task EnsureCoreWebView2Async()
-        {
-            return WebView2.EnsureCoreWebView2Async(Environment);
-        }
-    }
-}

+ 0 - 59
src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/Form1.Designer.cs

@@ -1,59 +0,0 @@
-
-namespace WinFormsTestApp
-{
-    partial class Form1
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.blazorWebView1 = new Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView();
-            this.SuspendLayout();
-            // 
-            // panel1
-            // 
-            this.blazorWebView1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.blazorWebView1.Location = new System.Drawing.Point(0, 0);
-            this.blazorWebView1.Name = "blazorWebView1";
-            this.blazorWebView1.Size = new System.Drawing.Size(1024, 768);
-            this.blazorWebView1.TabIndex = 0;
-            // 
-            // Form1
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 18F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1024, 768);
-            this.Controls.Add(this.blazorWebView1);
-            this.Name = "Form1";
-            this.Text = "Form1";
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView blazorWebView1;
-    }
-}

+ 0 - 25
src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/Form1.cs

@@ -1,25 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Windows.Forms;
-using System.Net.Http;
-using Microsoft.AspNetCore.Components.WebView.WindowsForms;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace WinFormsTestApp
-{
-    public partial class Form1 : Form
-    {
-        public Form1()
-        {
-            var serviceCollection = new ServiceCollection();
-            serviceCollection.AddBlazorWebView();
-            serviceCollection.AddSingleton<HttpClient>();
-            InitializeComponent();
-
-            blazorWebView1.HostPage = @"wwwroot\webviewhost.html";
-            blazorWebView1.Services = serviceCollection.BuildServiceProvider();
-            blazorWebView1.RootComponents.Add<BasicTestApp.Index>("root");
-        }
-    }
-}

+ 0 - 28
src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/Program.cs

@@ -1,28 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Windows.Forms;
-
-namespace WinFormsTestApp
-{
-    static class Program
-    {
-        /// <summary>
-        ///  The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
-            {
-                MessageBox.Show(text: error.ExceptionObject.ToString(), caption: "Error");
-            };
-
-            Application.SetHighDpiMode(HighDpiMode.SystemAware);
-            Application.EnableVisualStyles();
-            Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new Form1());
-        }
-    }
-}

+ 0 - 24
src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/WinFormsTestApp.csproj

@@ -1,24 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Razor">
-
-  <PropertyGroup>
-    <TargetFramework>$(DefaultNetCoreTargetFramework)-windows</TargetFramework>
-    <OutputType>WinExe</OutputType>
-    <UseWindowsForms>true</UseWindowsForms>
-    <IsShippingPackage>false</IsShippingPackage>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\..\..\test\testassets\BasicTestApp\BasicTestApp.csproj" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Update="wwwroot\**">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-
-</Project>

+ 0 - 26
src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/wwwroot/css/app.css

@@ -1,26 +0,0 @@
-#blazor-error-ui {
-    background: lightyellow;
-    bottom: 0;
-    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
-    display: none;
-    left: 0;
-    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
-    position: fixed;
-    width: 100%;
-    z-index: 1000;
-}
-
-#blazor-error-ui .dismiss {
-    cursor: pointer;
-    position: absolute;
-    right: 0.75rem;
-    top: 0.5rem;
-}
-
-.valid.modified:not([type=checkbox]) {
-    outline: 1px solid #26b050;
-}
-
-.invalid {
-    outline: 1px solid red;
-}

+ 0 - 57
src/Components/WebView/Platforms/WindowsForms/testassets/WinFormsTestApp/wwwroot/webviewhost.html

@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
-    <title>WinFormsTestApp</title>
-    <base href="/" />
-    <link href="css/app.css" rel="stylesheet" />
-
-    <!-- Used by ExternalContentPackage -->
-    <link href="_content/TestContentPackage/styles.css" rel="stylesheet" />
-
-    <!-- App bundle that contains a reference to the scoped css bundle created by TestContentPackage -->
-    <link href="WinFormsTestApp.styles.css" rel="stylesheet" />
-</head>
-
-<body>
-    <!-- The content here is duplicated from index.html in BasicTestApp -->
-
-    <root>Loading...</root>
-
-    <!-- Explicit display:none required so StartupErrorNotificationTest can observe it change -->
-    <div id="blazor-error-ui" style="display: none;">
-        An unhandled error has occurred.
-        <a href class='reload'>Reload</a>
-        <a class='dismiss' style="cursor: pointer;">🗙</a>
-    </div>
-
-    <!-- Used for specific test cases -->
-    <script src="js/jsinteroptests.js"></script>
-    <script src="js/renderattributestest.js"></script>
-    <script src="js/webComponentPerformingJsInterop.js"></script>
-    <script src="js/customLinkElement.js"></script>
-
-    <script>
-        // Used by ElementRefComponent
-        function setElementValue(element, newValue) {
-            element.value = newValue;
-            return element.value;
-        }
-
-        function navigationManagerNavigate() {
-            Blazor.navigateTo('/subdir/some-path');
-        }
-
-        function getCurrentUrl() {
-            return location.href;
-        }
-    </script>
-    <script src="_framework/blazor.webview.js"></script>
-
-    <!-- Used by ExternalContentPackage -->
-    <script src="_content/TestContentPackage/prompt.js"></script>
-</body>
-
-</html>

+ 0 - 226
src/Components/WebView/Platforms/Wpf/src/BlazorWebView.cs

@@ -1,226 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.IO;
-using System.Linq;
-using System.Windows;
-using System.Windows.Controls;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Extensions.FileProviders;
-using WebView2Control = Microsoft.Web.WebView2.Wpf.WebView2;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    /// <summary>
-    /// A Windows Presentation Foundation (WPF) control for hosting Blazor web components locally in Windows desktop applications.
-    /// </summary>
-    public sealed class BlazorWebView : Control, IDisposable
-    {
-        #region Dependency property definitions
-        /// <summary>
-        /// The backing store for the <see cref="HostPage"/> property.
-        /// </summary>
-        public static readonly DependencyProperty HostPageProperty = DependencyProperty.Register(
-            name: nameof(HostPage),
-            propertyType: typeof(string),
-            ownerType: typeof(BlazorWebView),
-            typeMetadata: new PropertyMetadata(OnHostPagePropertyChanged));
-
-        /// <summary>
-        /// The backing store for the <see cref="RootComponent"/> property.
-        /// </summary>
-        public static readonly DependencyProperty RootComponentsProperty = DependencyProperty.Register(
-            name: nameof(RootComponents),
-            propertyType: typeof(ObservableCollection<RootComponent>),
-            ownerType: typeof(BlazorWebView));
-
-        /// <summary>
-        /// The backing store for the <see cref="Services"/> property.
-        /// </summary>
-        public static readonly DependencyProperty ServicesProperty = DependencyProperty.Register(
-            name: nameof(Services),
-            propertyType: typeof(IServiceProvider),
-            ownerType: typeof(BlazorWebView),
-            typeMetadata: new PropertyMetadata(OnServicesPropertyChanged));
-        #endregion
-
-        private const string webViewTemplateChildName = "WebView";
-        private WebView2Control _webview;
-        private WebView2WebViewManager _webviewManager;
-        private bool _isDisposed;
-
-        /// <summary>
-        /// Creates a new instance of <see cref="BlazorWebView"/>.
-        /// </summary>
-        public BlazorWebView()
-        {
-            SetValue(RootComponentsProperty, new ObservableCollection<RootComponent>());
-            RootComponents.CollectionChanged += HandleRootComponentsCollectionChanged;
-
-            Template = new ControlTemplate
-            {
-                VisualTree = new FrameworkElementFactory(typeof(WebView2Control), webViewTemplateChildName)
-            };
-        }
-
-        /// <summary>
-        /// Path to the host page within the application's static files. For example, <code>wwwroot\index.html</code>.
-        /// This property must be set to a valid value for the Blazor components to start.
-        /// </summary>
-        public string HostPage
-        {
-            get => (string)GetValue(HostPageProperty);
-            set => SetValue(HostPageProperty, value);
-        }
-
-        /// <summary>
-        /// A collection of <see cref="RootComponent"/> instances that specify the Blazor <see cref="IComponent"/> types
-        /// to be used directly in the specified <see cref="HostPage"/>.
-        /// </summary>
-        public ObservableCollection<RootComponent> RootComponents =>
-            (ObservableCollection<RootComponent>)GetValue(RootComponentsProperty);
-
-        /// <summary>
-        /// Gets or sets an <see cref="IServiceProvider"/> containing services to be used by this control and also by application code.
-        /// This property must be set to a valid value for the Blazor components to start.
-        /// </summary>
-        public IServiceProvider Services
-        {
-            get => (IServiceProvider)GetValue(ServicesProperty);
-            set => SetValue(ServicesProperty, value);
-        }
-
-        private static void OnServicesPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((BlazorWebView)d).OnServicesPropertyChanged(e);
-
-        private void OnServicesPropertyChanged(DependencyPropertyChangedEventArgs e) => StartWebViewCoreIfPossible();
-
-        private static void OnHostPagePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((BlazorWebView)d).OnHostPagePropertyChanged(e);
-
-        private void OnHostPagePropertyChanged(DependencyPropertyChangedEventArgs e) => StartWebViewCoreIfPossible();
-
-        private bool RequiredStartupPropertiesSet =>
-            _webview != null &&
-            HostPage != null &&
-            Services != null;
-
-        /// <inheritdoc />
-        public override void OnApplyTemplate()
-        {
-            CheckDisposed();
-
-            // Called when the control is created after its child control (the WebView2) is created from the Template property
-            base.OnApplyTemplate();
-
-            if (_webview == null)
-            {
-                _webview = (WebView2Control)GetTemplateChild(webViewTemplateChildName);
-                StartWebViewCoreIfPossible();
-            }
-        }
-
-        /// <inheritdoc />
-        protected override void OnInitialized(EventArgs e)
-        {
-            // Called when BeginInit/EndInit are used, such as when creating the control from XAML
-            base.OnInitialized(e);
-            StartWebViewCoreIfPossible();
-        }
-
-        private void StartWebViewCoreIfPossible()
-        {
-            CheckDisposed();
-
-            if (!RequiredStartupPropertiesSet || _webviewManager != null)
-            {
-                return;
-            }
-
-            // We assume the host page is always in the root of the content directory, because it's
-            // unclear there's any other use case. We can add more options later if so.
-            var contentRootDir = Path.GetDirectoryName(Path.GetFullPath(HostPage));
-            var hostPageRelativePath = Path.GetRelativePath(contentRootDir, HostPage);
-            var fileProvider = new PhysicalFileProvider(contentRootDir);
-
-            _webviewManager = new WebView2WebViewManager(new WpfWebView2Wrapper(_webview), Services, WpfDispatcher.Instance, fileProvider, hostPageRelativePath);
-            foreach (var rootComponent in RootComponents)
-            {
-                // Since the page isn't loaded yet, this will always complete synchronously
-                _ = rootComponent.AddToWebViewManagerAsync(_webviewManager);
-            }
-            _webviewManager.Navigate("/");
-        }
-
-        private void HandleRootComponentsCollectionChanged(object sender, NotifyCollectionChangedEventArgs eventArgs)
-        {
-            CheckDisposed();
-
-            // If we haven't initialized yet, this is a no-op
-            if (_webviewManager != null)
-            {
-                // Dispatch because this is going to be async, and we want to catch any errors
-                WpfDispatcher.Instance.InvokeAsync(async () =>
-                {
-                    var newItems = eventArgs.NewItems.Cast<RootComponent>();
-                    var oldItems = eventArgs.OldItems.Cast<RootComponent>();
-
-                    foreach (var item in newItems.Except(oldItems))
-                    {
-                        await item.AddToWebViewManagerAsync(_webviewManager);
-                    }
-
-                    foreach (var item in oldItems.Except(newItems))
-                    {
-                        await item.RemoveFromWebViewManagerAsync(_webviewManager);
-                    }
-                });
-            }
-        }
-
-        private void Dispose(bool disposing)
-        {
-            if (!_isDisposed)
-            {
-                if (disposing)
-                {
-                    // Dispose managed state (managed objects)
-                    _webviewManager?.Dispose();
-                    _webview?.Dispose();
-                }
-
-                // Also: free unmanaged resources (unmanaged objects) and override finalizer
-                // Also: set large fields to null
-                _isDisposed = true;
-            }
-        }
-
-        /// <summary>
-        /// Performs the final cleanup before the garbage collector destroys the object.
-        /// </summary>
-        ~BlazorWebView()
-        {
-            // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
-            Dispose(disposing: false);
-        }
-
-        /// <summary>
-        /// Releases all resources used by the control.
-        /// </summary>
-        public void Dispose()
-        {
-            // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
-            Dispose(disposing: true);
-            GC.SuppressFinalize(this);
-        }
-
-        private void CheckDisposed()
-        {
-            if (_isDisposed)
-            {
-                throw new ObjectDisposedException(GetType().Name);
-            }
-        }
-    }
-}

+ 0 - 20
src/Components/WebView/Platforms/Wpf/src/Microsoft.AspNetCore.Components.WebView.Wpf.csproj

@@ -1,20 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <!-- Use TargetFrameworks (plural) instead of TargetFramework (singular) here even though there is only one target
-      framework. This is to work around an issue with the Microsoft.Web.WebView2 package:
-      https://github.com/MicrosoftEdge/WebView2Feedback/issues/710 -->
-    <TargetFrameworks>$(DefaultNetCoreTargetFramework)-windows</TargetFrameworks>
-    <Description>Build WPF applications with Blazor and WebView2.</Description>
-    <UseWPF>true</UseWPF>
-    <IsShippingPackage>true</IsShippingPackage>
-    <Nullable>disable</Nullable>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.WebView" />
-    <Reference Include="Microsoft.AspNetCore.Components.WebView.WebView2" />
-    <Reference Include="Microsoft.Web.WebView2" />
-  </ItemGroup>
-
-</Project>

+ 0 - 1
src/Components/WebView/Platforms/Wpf/src/PublicAPI.Shipped.txt

@@ -1 +0,0 @@
-#nullable enable

+ 0 - 21
src/Components/WebView/Platforms/Wpf/src/PublicAPI.Unshipped.txt

@@ -1,21 +0,0 @@
-#nullable enable
-Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView
-Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.BlazorWebView() -> void
-Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.Dispose() -> void
-~Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.HostPage.get -> string
-~Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.HostPage.set -> void
-~Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.RootComponents.get -> System.Collections.ObjectModel.ObservableCollection<Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent>
-~Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.Services.get -> System.IServiceProvider
-~Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.Services.set -> void
-Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent
-~Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent.ComponentType.get -> System.Type
-~Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent.ComponentType.set -> void
-~Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent.Parameters.get -> System.Collections.Generic.IDictionary<string, object>
-~Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent.Parameters.set -> void
-Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent.RootComponent() -> void
-~Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent.Selector.get -> string
-~Microsoft.AspNetCore.Components.WebView.Wpf.RootComponent.Selector.set -> void
-override Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.OnApplyTemplate() -> void
-~static readonly Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.HostPageProperty -> System.Windows.DependencyProperty
-~static readonly Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.RootComponentsProperty -> System.Windows.DependencyProperty
-~static readonly Microsoft.AspNetCore.Components.WebView.Wpf.BlazorWebView.ServicesProperty -> System.Windows.DependencyProperty

+ 0 - 57
src/Components/WebView/Platforms/Wpf/src/RootComponent.cs

@@ -1,57 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    /// <summary>
-    /// Describes a root component that can be added to a <see cref="BlazorWebView"/>.
-    /// </summary>
-    public class RootComponent
-    {
-        /// <summary>
-        /// Gets or sets the CSS selector string that specifies where in the document the component should be placed.
-        /// This must be unique among the root components within the <see cref="BlazorWebView"/>.
-        /// </summary>
-        public string Selector { get; set; }
-
-        /// <summary>
-        /// Gets or sets the type of the root component. This type must implement <see cref="IComponent"/>.
-        /// </summary>
-        public Type ComponentType { get; set; }
-
-        /// <summary>
-        /// Gets or sets an optional dictionary of parameters to pass to the root component.
-        /// </summary>
-        public IDictionary<string, object> Parameters { get; set; }
-
-        internal Task AddToWebViewManagerAsync(WebViewManager webViewManager)
-        {
-            // As a characteristic of XAML,we can't rely on non-default constructors. So we have to
-            // validate that the required properties were set. We could skip validating this and allow
-            // the lower-level renderer code to throw, but that would be harder for developers to understand.
-
-            if (string.IsNullOrWhiteSpace(Selector))
-            {
-                throw new InvalidOperationException($"{nameof(RootComponent)} requires a value for its {nameof(Selector)} property, but no value was set.");
-            }
-
-            if (ComponentType is null)
-            {
-                throw new InvalidOperationException($"{nameof(RootComponent)} requires a value for its {nameof(ComponentType)} property, but no value was set.");
-            }
-
-            var parameterView = Parameters == null ? ParameterView.Empty : ParameterView.FromDictionary(Parameters);
-            return webViewManager.AddRootComponentAsync(ComponentType, Selector, parameterView);
-        }
-
-        internal Task RemoveFromWebViewManagerAsync(WebView2WebViewManager webviewManager)
-        {
-            return webviewManager.RemoveRootComponentAsync(Selector);
-        }
-    }
-}

+ 0 - 27
src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2AcceleratorKeyPressedEventArgsWrapper.cs

@@ -1,27 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    internal class WpfCoreWebView2AcceleratorKeyPressedEventArgsWrapper : ICoreWebView2AcceleratorKeyPressedEventArgsWrapper
-    {
-        private readonly CoreWebView2AcceleratorKeyPressedEventArgs _eventArgs;
-
-        public WpfCoreWebView2AcceleratorKeyPressedEventArgsWrapper(CoreWebView2AcceleratorKeyPressedEventArgs eventArgs)
-        {
-            _eventArgs = eventArgs;
-        }
-        public uint VirtualKey => _eventArgs.VirtualKey;
-
-        public int KeyEventLParam => _eventArgs.KeyEventLParam;
-
-        public bool Handled
-        {
-            get => _eventArgs.Handled;
-            set => _eventArgs.Handled = value;
-        }
-    }
-}

+ 0 - 64
src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2SettingsWrapper.cs

@@ -1,64 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    internal class WpfCoreWebView2SettingsWrapper : ICoreWebView2SettingsWrapper
-    {
-        private readonly CoreWebView2Settings _settings;
-
-        public WpfCoreWebView2SettingsWrapper(CoreWebView2Settings settings)
-        {
-            _settings = settings;
-        }
-
-        public bool IsScriptEnabled
-        {
-            get => _settings.IsScriptEnabled;
-            set => _settings.IsScriptEnabled = value;
-        }
-        public bool IsWebMessageEnabled
-        {
-            get => _settings.IsWebMessageEnabled;
-            set => _settings.IsWebMessageEnabled = value;
-        }
-        public bool AreDefaultScriptDialogsEnabled
-        {
-            get => _settings.AreDefaultScriptDialogsEnabled;
-            set => _settings.AreDefaultScriptDialogsEnabled = value;
-        }
-        public bool IsStatusBarEnabled
-        {
-            get => _settings.IsStatusBarEnabled;
-            set => _settings.IsStatusBarEnabled = value;
-        }
-        public bool AreDevToolsEnabled
-        {
-            get => _settings.AreDevToolsEnabled;
-            set => _settings.AreDevToolsEnabled = value;
-        }
-        public bool AreDefaultContextMenusEnabled
-        {
-            get => _settings.AreDefaultContextMenusEnabled;
-            set => _settings.AreDefaultContextMenusEnabled = value;
-        }
-        public bool AreHostObjectsAllowed
-        {
-            get => _settings.AreHostObjectsAllowed;
-            set => _settings.AreHostObjectsAllowed = value;
-        }
-        public bool IsZoomControlEnabled
-        {
-            get => _settings.IsZoomControlEnabled;
-            set => _settings.IsZoomControlEnabled = value;
-        }
-        public bool IsBuiltInErrorPageEnabled
-        {
-            get => _settings.IsBuiltInErrorPageEnabled;
-            set => _settings.IsBuiltInErrorPageEnabled = value;
-        }
-    }
-}

+ 0 - 29
src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2WebResourceRequestWrapper.cs

@@ -1,29 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    internal class WpfCoreWebView2WebResourceRequestWrapper : ICoreWebView2WebResourceRequestWrapper
-    {
-        private readonly CoreWebView2WebResourceRequestedEventArgs _webResourceRequestedEventArgs;
-
-        public WpfCoreWebView2WebResourceRequestWrapper(CoreWebView2WebResourceRequestedEventArgs webResourceRequestedEventArgs)
-        {
-            _webResourceRequestedEventArgs = webResourceRequestedEventArgs;
-        }
-
-        public string Uri
-        {
-            get => _webResourceRequestedEventArgs.Request.Uri;
-            set => _webResourceRequestedEventArgs.Request.Uri = value;
-        }
-        public string Method
-        {
-            get => _webResourceRequestedEventArgs.Request.Method;
-            set => _webResourceRequestedEventArgs.Request.Method = value;
-        }
-    }
-}

+ 0 - 33
src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2WebResourceRequestedEventArgsWrapper.cs

@@ -1,33 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.IO;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    internal class WpfCoreWebView2WebResourceRequestedEventArgsWrapper : ICoreWebView2WebResourceRequestedEventArgsWrapper
-    {
-        private readonly CoreWebView2Environment _environment;
-        private readonly CoreWebView2WebResourceRequestedEventArgs _webResourceRequestedEventArgs;
-
-        public WpfCoreWebView2WebResourceRequestedEventArgsWrapper(CoreWebView2Environment environment, CoreWebView2WebResourceRequestedEventArgs webResourceRequestedEventArgs)
-        {
-            _environment = environment;
-            _webResourceRequestedEventArgs = webResourceRequestedEventArgs;
-
-            Request = new WpfCoreWebView2WebResourceRequestWrapper(webResourceRequestedEventArgs);
-            ResourceContext = (CoreWebView2WebResourceContextWrapper)webResourceRequestedEventArgs.ResourceContext;
-        }
-
-        public ICoreWebView2WebResourceRequestWrapper Request { get; }
-
-        public CoreWebView2WebResourceContextWrapper ResourceContext { get; }
-
-        public void SetResponse(Stream content, int statusCode, string statusMessage, string headerString)
-        {
-            _webResourceRequestedEventArgs.Response = _environment.CreateWebResourceResponse(content, statusCode, statusMessage, headerString);
-        }
-    }
-}

+ 0 - 85
src/Components/WebView/Platforms/Wpf/src/WpfCoreWebView2Wrapper.cs

@@ -1,85 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    internal class WpfCoreWebView2Wrapper : ICoreWebView2Wrapper
-    {
-        private readonly WpfWebView2Wrapper _webView2;
-        private WpfCoreWebView2SettingsWrapper _settings;
-
-        public WpfCoreWebView2Wrapper(WpfWebView2Wrapper webView2)
-        {
-            if (webView2 is null)
-            {
-                throw new ArgumentNullException(nameof(webView2));
-            }
-
-            _webView2 = webView2;
-        }
-
-        public ICoreWebView2SettingsWrapper Settings
-        {
-            get
-            {
-                if (_settings == null)
-                {
-                    _settings = new WpfCoreWebView2SettingsWrapper(_webView2.WebView2.CoreWebView2.Settings);
-                }
-                return _settings;
-            }
-        }
-
-        public Task AddScriptToExecuteOnDocumentCreatedAsync(string javaScript)
-        {
-            return _webView2.WebView2.CoreWebView2.AddScriptToExecuteOnDocumentCreatedAsync(javaScript);
-        }
-
-        public Action AddWebMessageReceivedHandler(Action<WebMessageReceivedEventArgs> messageReceivedHandler)
-        {
-            void nativeEventHandler(object sender, CoreWebView2WebMessageReceivedEventArgs e)
-            {
-                messageReceivedHandler(new WebMessageReceivedEventArgs(e.Source, e.TryGetWebMessageAsString()));
-            }
-
-            _webView2.WebView2.CoreWebView2.WebMessageReceived += nativeEventHandler;
-
-            // Return removal callback
-            return () =>
-            {
-                _webView2.WebView2.CoreWebView2.WebMessageReceived -= nativeEventHandler;
-            };
-        }
-
-        public void AddWebResourceRequestedFilter(string uri, CoreWebView2WebResourceContextWrapper resourceContext)
-        {
-            _webView2.WebView2.CoreWebView2.AddWebResourceRequestedFilter(uri, (CoreWebView2WebResourceContext)resourceContext);
-        }
-
-        public Action AddWebResourceRequestedHandler(EventHandler<ICoreWebView2WebResourceRequestedEventArgsWrapper> webResourceRequestedHandler)
-        {
-            void nativeEventHandler(object sender, CoreWebView2WebResourceRequestedEventArgs e)
-            {
-                webResourceRequestedHandler(_webView2.WebView2, new WpfCoreWebView2WebResourceRequestedEventArgsWrapper(_webView2.Environment, e));
-            }
-
-            _webView2.WebView2.CoreWebView2.WebResourceRequested += nativeEventHandler;
-
-            // Return removal callback
-            return () =>
-            {
-                _webView2.WebView2.CoreWebView2.WebResourceRequested -= nativeEventHandler;
-            };
-        }
-
-        public void PostWebMessageAsString(string webMessageAsString)
-        {
-            _webView2.WebView2.CoreWebView2.PostWebMessageAsString(webMessageAsString);
-        }
-    }
-}

+ 0 - 121
src/Components/WebView/Platforms/Wpf/src/WpfDispatcher.cs

@@ -1,121 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Runtime.ExceptionServices;
-using System.Threading.Tasks;
-using System.Windows;
-using WindowsDispatcher = System.Windows.Threading.Dispatcher;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    internal sealed class WpfDispatcher : Dispatcher
-    {
-        private readonly WindowsDispatcher _windowsDispatcher;
-
-        private WpfDispatcher(WindowsDispatcher windowsDispatcher)
-        {
-            _windowsDispatcher = windowsDispatcher ?? throw new ArgumentNullException(nameof(windowsDispatcher));
-        }
-
-        public static Dispatcher Instance { get; } = new WpfDispatcher(Application.Current.Dispatcher);
-
-        private static Action<Exception> RethrowException = exception =>
-            ExceptionDispatchInfo.Capture(exception).Throw();
-
-        public override bool CheckAccess()
-            => _windowsDispatcher.CheckAccess();
-
-        public override async Task InvokeAsync(Action workItem)
-        {
-            try
-            {
-                if (_windowsDispatcher.CheckAccess())
-                {
-                    workItem();
-                }
-                else
-                {
-                    await _windowsDispatcher.InvokeAsync(workItem);
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _windowsDispatcher.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-
-        public override async Task InvokeAsync(Func<Task> workItem)
-        {
-            try
-            {
-                if (_windowsDispatcher.CheckAccess())
-                {
-                    await workItem();
-                }
-                else
-                {
-                    await _windowsDispatcher.InvokeAsync(workItem);
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _windowsDispatcher.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-
-        public override async Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem)
-        {
-            try
-            {
-                if (_windowsDispatcher.CheckAccess())
-                {
-                    return workItem();
-                }
-                else
-                {
-                    return await _windowsDispatcher.InvokeAsync(workItem);
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _windowsDispatcher.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-
-        public override async Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
-        {
-            try
-            {
-                if (_windowsDispatcher.CheckAccess())
-                {
-                    return await workItem();
-                }
-                else
-                {
-                    return await _windowsDispatcher.InvokeAsync(workItem).Task.Unwrap();
-                }
-            }
-            catch (Exception ex)
-            {
-                // TODO: Determine whether this is the right kind of rethrowing pattern
-                // You do have to do something like this otherwise unhandled exceptions
-                // throw from inside Dispatcher.InvokeAsync are simply lost.
-                _ = _windowsDispatcher.BeginInvoke(RethrowException, ex);
-                throw;
-            }
-        }
-    }
-}

+ 0 - 61
src/Components/WebView/Platforms/Wpf/src/WpfWebView2Wrapper.cs

@@ -1,61 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.WebView.WebView2;
-using Microsoft.Web.WebView2.Core;
-using WebView2Control = Microsoft.Web.WebView2.Wpf.WebView2;
-
-namespace Microsoft.AspNetCore.Components.WebView.Wpf
-{
-    internal class WpfWebView2Wrapper : IWebView2Wrapper
-    {
-        private readonly WpfCoreWebView2Wrapper _coreWebView2Wrapper;
-
-        public WpfWebView2Wrapper(WebView2Control webView2)
-        {
-            if (webView2 is null)
-            {
-                throw new ArgumentNullException(nameof(webView2));
-            }
-
-            WebView2 = webView2;
-            _coreWebView2Wrapper = new WpfCoreWebView2Wrapper(this);
-        }
-
-        public ICoreWebView2Wrapper CoreWebView2 => _coreWebView2Wrapper;
-
-        public Uri Source
-        {
-            get => WebView2.Source;
-            set => WebView2.Source = value;
-        }
-
-        public WebView2Control WebView2 { get; }
-
-        public CoreWebView2Environment Environment { get; set; }
-
-        public Action AddAcceleratorKeyPressedHandler(EventHandler<ICoreWebView2AcceleratorKeyPressedEventArgsWrapper> eventHandler)
-        {
-            EventHandler<CoreWebView2AcceleratorKeyPressedEventArgs> realHandler = (object sender, CoreWebView2AcceleratorKeyPressedEventArgs e) =>
-            {
-                eventHandler(WebView2, new WpfCoreWebView2AcceleratorKeyPressedEventArgsWrapper(e));
-            };
-            WebView2.AcceleratorKeyPressed += realHandler;
-
-            // Return removal callback
-            return () => { WebView2.AcceleratorKeyPressed -= realHandler; };
-        }
-
-        public async Task CreateEnvironmentAsync()
-        {
-            Environment = await CoreWebView2Environment.CreateAsync();
-        }
-
-        public Task EnsureCoreWebView2Async()
-        {
-            return WebView2.EnsureCoreWebView2Async(Environment);
-        }
-    }
-}

+ 0 - 10
src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/App.xaml

@@ -1,10 +0,0 @@
-<Application x:Class="WpfTestApp.App"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:local="clr-namespace:WpfTestApp"
-             StartupUri="MainWindow.xaml"
-             Startup="Application_Startup">
-    <Application.Resources>
-
-    </Application.Resources>
-</Application>

+ 0 - 22
src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/App.xaml.cs

@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Windows;
-
-namespace WpfTestApp
-{
-    /// <summary>
-    /// Interaction logic for App.xaml
-    /// </summary>
-    public partial class App : Application
-    {
-        private void Application_Startup(object sender, StartupEventArgs e)
-        {
-            AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
-            {
-                MessageBox.Show(error.ExceptionObject.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
-            };
-        }
-    }
-}

+ 0 - 15
src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/MainWindow.xaml

@@ -1,15 +0,0 @@
-<Window x:Class="WpfTestApp.MainWindow"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:basictestapp="clr-namespace:BasicTestApp;assembly=BasicTestApp"
-        xmlns:blazor="clr-namespace:Microsoft.AspNetCore.Components.WebView.Wpf;assembly=Microsoft.AspNetCore.Components.WebView.Wpf"
-        mc:Ignorable="d"
-        Title="MainWindow" Height="450" Width="800">
-    <blazor:BlazorWebView HostPage="wwwroot\webviewhost.html" Services="{StaticResource services}">
-        <blazor:BlazorWebView.RootComponents>
-            <blazor:RootComponent Selector="root" ComponentType="{x:Type basictestapp:Index}" />
-        </blazor:BlazorWebView.RootComponents>
-    </blazor:BlazorWebView>
-</Window>

+ 0 - 25
src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/MainWindow.xaml.cs

@@ -1,25 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Net.Http;
-using System.Windows;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace WpfTestApp
-{
-    /// <summary>
-    /// Interaction logic for MainWindow.xaml
-    /// </summary>
-    public partial class MainWindow : Window
-    {
-        public MainWindow()
-        {
-            var serviceCollection = new ServiceCollection();
-            serviceCollection.AddBlazorWebView();
-            serviceCollection.AddSingleton<HttpClient>();
-            Resources.Add("services", serviceCollection.BuildServiceProvider());
-
-            InitializeComponent();
-        }
-    }
-}

+ 0 - 24
src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/WpfTestApp.csproj

@@ -1,24 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Razor">
-
-  <PropertyGroup>
-    <TargetFramework>$(DefaultNetCoreTargetFramework)-windows</TargetFramework>
-    <OutputType>WinExe</OutputType>
-    <UseWPF>true</UseWPF>
-    <IsShippingPackage>false</IsShippingPackage>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\..\..\test\testassets\BasicTestApp\BasicTestApp.csproj" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.WebView.Wpf" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Update="wwwroot\**">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-
-</Project>

+ 0 - 26
src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/wwwroot/css/app.css

@@ -1,26 +0,0 @@
-#blazor-error-ui {
-    background: lightyellow;
-    bottom: 0;
-    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
-    display: none;
-    left: 0;
-    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
-    position: fixed;
-    width: 100%;
-    z-index: 1000;
-}
-
-#blazor-error-ui .dismiss {
-    cursor: pointer;
-    position: absolute;
-    right: 0.75rem;
-    top: 0.5rem;
-}
-
-.valid.modified:not([type=checkbox]) {
-    outline: 1px solid #26b050;
-}
-
-.invalid {
-    outline: 1px solid red;
-}

+ 0 - 57
src/Components/WebView/Platforms/Wpf/testassets/WpfTestApp/wwwroot/webviewhost.html

@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
-    <title>WinFormsTestApp</title>
-    <base href="/" />
-    <link href="css/app.css" rel="stylesheet" />
-
-    <!-- Used by ExternalContentPackage -->
-    <link href="_content/TestContentPackage/styles.css" rel="stylesheet" />
-
-    <!-- App bundle that contains a reference to the scoped css bundle created by TestContentPackage -->
-    <link href="WpfTestApp.styles.css" rel="stylesheet" />
-</head>
-
-<body>
-    <!-- The content here is duplicated from index.html in BasicTestApp -->
-
-    <root>Loading...</root>
-
-    <!-- Explicit display:none required so StartupErrorNotificationTest can observe it change -->
-    <div id="blazor-error-ui" style="display: none;">
-        An unhandled error has occurred.
-        <a href class='reload'>Reload</a>
-        <a class='dismiss' style="cursor: pointer;">🗙</a>
-    </div>
-
-    <!-- Used for specific test cases -->
-    <script src="js/jsinteroptests.js"></script>
-    <script src="js/renderattributestest.js"></script>
-    <script src="js/webComponentPerformingJsInterop.js"></script>
-    <script src="js/customLinkElement.js"></script>
-
-    <script>
-        // Used by ElementRefComponent
-        function setElementValue(element, newValue) {
-            element.value = newValue;
-            return element.value;
-        }
-
-        function navigationManagerNavigate() {
-            Blazor.navigateTo('/subdir/some-path');
-        }
-
-        function getCurrentUrl() {
-            return location.href;
-        }
-    </script>
-    <script src="_framework/blazor.webview.js"></script>
-
-    <!-- Used by ExternalContentPackage -->
-    <script src="_content/TestContentPackage/prompt.js"></script>
-</body>
-
-</html>

+ 0 - 10
src/Components/WebView/Samples/BlazorWinFormsApp/AppState.cs

@@ -1,10 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace BlazorWinFormsApp
-{
-    public class AppState
-    {
-        public int Counter { get; set; }
-    }
-}

+ 0 - 24
src/Components/WebView/Samples/BlazorWinFormsApp/BlazorWinFormsApp.csproj

@@ -1,24 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Razor">
-
-  <PropertyGroup>
-    <TargetFramework>$(DefaultNetCoreTargetFramework)-windows</TargetFramework>
-    <OutputType>WinExe</OutputType>
-    <UseWindowsForms>true</UseWindowsForms>
-    <IsShippingPackage>false</IsShippingPackage>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\WebviewAppShared\WebviewAppShared.csproj" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Update="wwwroot\**">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-
-</Project>

+ 0 - 35
src/Components/WebView/Samples/BlazorWinFormsApp/Form1.cs

@@ -1,35 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Windows.Forms;
-using Microsoft.AspNetCore.Components.WebView.WindowsForms;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace BlazorWinFormsApp
-{
-    public partial class Form1 : Form
-    {
-        private readonly AppState _appState = new();
-
-        public Form1()
-        {
-            var serviceCollection = new ServiceCollection();
-            serviceCollection.AddBlazorWebView();
-            serviceCollection.AddSingleton<AppState>(_appState);
-            InitializeComponent();
-
-            blazorWebView1.HostPage = @"wwwroot\index.html";
-            blazorWebView1.Services = serviceCollection.BuildServiceProvider();
-            blazorWebView1.RootComponents.Add<Main>("#app");
-        }
-
-        private void button1_Click(object sender, EventArgs e)
-        {
-            MessageBox.Show(
-                owner: this,
-                text: $"Current counter value is: {_appState.Counter}",
-                caption: "Counter");
-        }
-    }
-}

+ 0 - 102
src/Components/WebView/Samples/BlazorWinFormsApp/Form1.designer.cs

@@ -1,102 +0,0 @@
-namespace BlazorWinFormsApp
-{
-    partial class Form1
-    {
-        /// <summary>
-        ///  Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        ///  Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        ///  Required method for Designer support - do not modify
-        ///  the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.label1 = new System.Windows.Forms.Label();
-            this.button1 = new System.Windows.Forms.Button();
-            this.blazorWebView1 = new Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView();
-            this.groupBox1.SuspendLayout();
-            this.SuspendLayout();
-            // 
-            // groupBox1
-            // 
-            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.groupBox1.Controls.Add(this.label1);
-            this.groupBox1.Controls.Add(this.button1);
-            this.groupBox1.Location = new System.Drawing.Point(13, 13);
-            this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(775, 162);
-            this.groupBox1.TabIndex = 10;
-            this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "Native Windows Forms UI";
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(28, 68);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(157, 32);
-            this.label1.TabIndex = 10;
-            this.label1.Text = "This is a label";
-            // 
-            // button1
-            // 
-            this.button1.Location = new System.Drawing.Point(364, 68);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(342, 46);
-            this.button1.TabIndex = 20;
-            this.button1.Text = "&Click to see counter value";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
-            // 
-            // blazorWebView1
-            // 
-            this.blazorWebView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.blazorWebView1.Location = new System.Drawing.Point(13, 181);
-            this.blazorWebView1.Name = "blazorWebView1";
-            this.blazorWebView1.Size = new System.Drawing.Size(775, 257);
-            this.blazorWebView1.TabIndex = 20;
-            // 
-            // Form1
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 32F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(800, 450);
-            this.Controls.Add(this.blazorWebView1);
-            this.Controls.Add(this.groupBox1);
-            this.Name = "Form1";
-            this.Text = "Blazor Web in Windows Forms";
-            this.groupBox1.ResumeLayout(false);
-            this.groupBox1.PerformLayout();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Button button1;
-        private Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView blazorWebView1;
-    }
-}

+ 0 - 12
src/Components/WebView/Samples/BlazorWinFormsApp/Main.razor

@@ -1,12 +0,0 @@
-<Router AppAssembly="@GetType().Assembly">
-    <Found Context="routeData">
-        <NavLink href="" Match="NavLinkMatch.All">Home</NavLink> |
-        <NavLink href="other">Other</NavLink>
-        <hr />
-        <RouteView RouteData="@routeData" />
-    </Found>
-    <NotFound>
-        <h1>Not found</h1>
-        <p>Sorry, there's nothing here.</p>
-    </NotFound>
-</Router>

+ 0 - 25
src/Components/WebView/Samples/BlazorWinFormsApp/Pages/Index.razor

@@ -1,25 +0,0 @@
-@page "/"
-@inject AppState AppState
-@using WebviewAppShared
-
-<h3>Hello, world!</h3>
-
-<p>The current count is <strong>@AppState.Counter</strong></p>
-
-<button @onclick="IncrementCount">Increment</button>
-<button @onclick="TriggerException">Throw</button>
-
-<p>This is a shared component</p>
-<SharedComponent />
-
-@code {
-    void IncrementCount()
-    {
-        AppState.Counter++;
-    }
-
-    void TriggerException()
-    {
-        throw new InvalidTimeZoneException("This is an exception from an event handler");
-    }
-}

+ 0 - 13
src/Components/WebView/Samples/BlazorWinFormsApp/Pages/Other.razor

@@ -1,13 +0,0 @@
-@page "/other"
-@inject NavigationManager NavigationManager
-
-Here is another page. Looks like navigation works.
-
-<button @onclick="BackToHome">Navigate back programmatically</button>
-
-@code {
-    void BackToHome()
-    {
-        NavigationManager.NavigateTo("");
-    }
-}

+ 0 - 31
src/Components/WebView/Samples/BlazorWinFormsApp/Program.cs

@@ -1,31 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace BlazorWinFormsApp
-{
-    static class Program
-    {
-        /// <summary>
-        ///  The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
-            {
-                MessageBox.Show(text: error.ExceptionObject.ToString(), caption: "Error");
-            };
-
-            Application.SetHighDpiMode(HighDpiMode.SystemAware);
-            Application.EnableVisualStyles();
-            Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new Form1());
-        }
-    }
-}

+ 0 - 7
src/Components/WebView/Samples/BlazorWinFormsApp/_Imports.razor

@@ -1,7 +0,0 @@
-@using System.Net.Http
-@using System.Net.Http.Json
-@using Microsoft.AspNetCore.Components.Forms
-@using Microsoft.AspNetCore.Components.Routing
-@using Microsoft.AspNetCore.Components.Web
-@using Microsoft.AspNetCore.Components.Web.Virtualization
-@using Microsoft.JSInterop

+ 0 - 18
src/Components/WebView/Samples/BlazorWinFormsApp/wwwroot/css/app.css

@@ -1,18 +0,0 @@
-#blazor-error-ui {
-    background: lightyellow;
-    bottom: 0;
-    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
-    display: none;
-    left: 0;
-    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
-    position: fixed;
-    width: 100%;
-    z-index: 1000;
-}
-
-#blazor-error-ui .dismiss {
-    cursor: pointer;
-    position: absolute;
-    right: 0.75rem;
-    top: 0.5rem;
-}

+ 0 - 25
src/Components/WebView/Samples/BlazorWinFormsApp/wwwroot/index.html

@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
-    <title>Blazor WinForms app</title>
-    <base href="/" />
-    <link href="css/app.css" rel="stylesheet" />
-    <link href="BlazorWinFormsApp.styles.css" rel="stylesheet" />
-</head>
-
-<body>
-    <div id="app"></div>
-
-    <div id="blazor-error-ui">
-        An unhandled error has occurred.
-        <a href="" class="reload">Reload</a>
-        <a class="dismiss">🗙</a>
-    </div>
-
-    <script src="_framework/blazor.webview.js"></script>
-</body>
-
-</html>

+ 0 - 10
src/Components/WebView/Samples/BlazorWpfApp/App.xaml

@@ -1,10 +0,0 @@
-<Application x:Class="BlazorWpfApp.App"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:local="clr-namespace:BlazorWpfApp"
-             StartupUri="MainWindow.xaml"
-             Startup="Application_Startup">
-    <Application.Resources>
-         
-    </Application.Resources>
-</Application>

+ 0 - 22
src/Components/WebView/Samples/BlazorWpfApp/App.xaml.cs

@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Windows;
-
-namespace BlazorWpfApp
-{
-    /// <summary>
-    /// Interaction logic for App.xaml
-    /// </summary>
-    public partial class App : Application
-    {
-        private void Application_Startup(object sender, StartupEventArgs e)
-        {
-            AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
-            {
-                MessageBox.Show(error.ExceptionObject.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
-            };
-        }
-    }
-}

+ 0 - 10
src/Components/WebView/Samples/BlazorWpfApp/AppState.cs

@@ -1,10 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace BlazorWpfApp
-{
-    public class AppState
-    {
-        public int Counter { get; set; }
-    }
-}

+ 0 - 24
src/Components/WebView/Samples/BlazorWpfApp/BlazorWpfApp.csproj

@@ -1,24 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Razor">
-
-  <PropertyGroup>
-    <TargetFramework>$(DefaultNetCoreTargetFramework)-windows</TargetFramework>
-    <OutputType>WinExe</OutputType>
-    <UseWPF>true</UseWPF>
-    <IsShippingPackage>false</IsShippingPackage>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\WebviewAppShared\WebviewAppShared.csproj" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.WebView.Wpf" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Update="wwwroot\**">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-
-</Project>

+ 0 - 12
src/Components/WebView/Samples/BlazorWpfApp/Main.razor

@@ -1,12 +0,0 @@
-<Router AppAssembly="@GetType().Assembly">
-    <Found Context="routeData">
-        <NavLink href="" Match="NavLinkMatch.All">Home</NavLink> |
-        <NavLink href="other">Other</NavLink>
-        <hr />
-        <RouteView RouteData="@routeData" />
-    </Found>
-    <NotFound>
-        <h1>Not found</h1>
-        <p>Sorry, there's nothing here.</p>
-    </NotFound>
-</Router>

+ 0 - 21
src/Components/WebView/Samples/BlazorWpfApp/MainWindow.xaml

@@ -1,21 +0,0 @@
-<Window x:Class="BlazorWpfApp.MainWindow"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:BlazorWpfApp"
-        xmlns:blazor="clr-namespace:Microsoft.AspNetCore.Components.WebView.Wpf;assembly=Microsoft.AspNetCore.Components.WebView.Wpf"
-        mc:Ignorable="d"
-        Title="MainWindow" Height="450" Width="800">
-    <DockPanel>
-        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Background="CadetBlue">
-            <Label>This is native WPF UI</Label>
-            <Button Click="Button_Click" Margin="4" Padding="4">Check counter</Button>
-        </StackPanel>
-        <blazor:BlazorWebView HostPage="wwwroot\index.html" Services="{StaticResource services}">
-            <blazor:BlazorWebView.RootComponents>
-                <blazor:RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
-            </blazor:BlazorWebView.RootComponents>
-        </blazor:BlazorWebView>
-    </DockPanel>
-</Window>

+ 0 - 38
src/Components/WebView/Samples/BlazorWpfApp/MainWindow.xaml.cs

@@ -1,38 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Windows;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace BlazorWpfApp
-{
-    /// <summary>
-    /// Interaction logic for MainWindow.xaml
-    /// </summary>
-    public partial class MainWindow : Window
-    {
-        private readonly AppState _appState = new();
-
-        public MainWindow()
-        {
-            var serviceCollection = new ServiceCollection();
-            serviceCollection.AddBlazorWebView();
-            serviceCollection.AddSingleton<AppState>(_appState);
-            Resources.Add("services", serviceCollection.BuildServiceProvider());
-
-            InitializeComponent();
-        }
-
-        private void Button_Click(object sender, RoutedEventArgs e)
-        {
-            MessageBox.Show(
-                owner: this,
-                messageBoxText: $"Current counter value is: {_appState.Counter}",
-                caption: "Counter");
-        }
-    }
-
-    // Workaround for compiler error "error MC3050: Cannot find the type 'local:Main'"
-    // It seems that, although WPF's design-time build can see Razor components, its runtime build cannot.
-    public partial class Main { }
-}

+ 0 - 26
src/Components/WebView/Samples/BlazorWpfApp/Pages/Index.razor

@@ -1,26 +0,0 @@
-@page "/"
-@using WebviewAppShared
-@* NOTE: The full namespace is included here to work around this bug: https://github.com/dotnet/aspnetcore/issues/30851 *@
-@inject BlazorWpfApp.AppState AppState
-
-<h3>Hello, world!</h3>
-
-<p>The current count is <strong>@AppState.Counter</strong></p>
-
-<button @onclick="IncrementCount">Increment</button>
-<button @onclick="TriggerException">Throw</button>
-
-<p>This is a shared component</p>
-<SharedComponent />
-
-@code {
-    void IncrementCount()
-    {
-        AppState.Counter++;
-    }
-
-    void TriggerException()
-    {
-        throw new InvalidTimeZoneException("This is an exception from an event handler");
-    }
-}

+ 0 - 13
src/Components/WebView/Samples/BlazorWpfApp/Pages/Other.razor

@@ -1,13 +0,0 @@
-@page "/other"
-@inject NavigationManager NavigationManager
-
-Here is another page. Looks like navigation works.
-
-<button @onclick="BackToHome">Navigate back programmatically</button>
-
-@code {
-    void BackToHome()
-    {
-        NavigationManager.NavigateTo("");
-    }
-}

+ 0 - 7
src/Components/WebView/Samples/BlazorWpfApp/_Imports.razor

@@ -1,7 +0,0 @@
-@using System.Net.Http
-@using System.Net.Http.Json
-@using Microsoft.AspNetCore.Components.Forms
-@using Microsoft.AspNetCore.Components.Routing
-@using Microsoft.AspNetCore.Components.Web
-@using Microsoft.AspNetCore.Components.Web.Virtualization
-@using Microsoft.JSInterop

+ 0 - 18
src/Components/WebView/Samples/BlazorWpfApp/wwwroot/css/app.css

@@ -1,18 +0,0 @@
-#blazor-error-ui {
-    background: lightyellow;
-    bottom: 0;
-    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
-    display: none;
-    left: 0;
-    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
-    position: fixed;
-    width: 100%;
-    z-index: 1000;
-}
-
-#blazor-error-ui .dismiss {
-    cursor: pointer;
-    position: absolute;
-    right: 0.75rem;
-    top: 0.5rem;
-}

+ 0 - 25
src/Components/WebView/Samples/BlazorWpfApp/wwwroot/index.html

@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
-    <title>Blazor WPF app</title>
-    <base href="/" />
-    <link href="css/app.css" rel="stylesheet" />
-    <link href="BlazorWpfApp.styles.css" rel="stylesheet" />
-</head>
-
-<body>
-    <div id="app"></div>
-
-    <div id="blazor-error-ui">
-        An unhandled error has occurred.
-        <a href="" class="reload">Reload</a>
-        <a class="dismiss">🗙</a>
-    </div>
-
-    <script src="_framework/blazor.webview.js"></script>
-</body>
-
-</html>

+ 0 - 39
src/Components/WebView/Samples/WebviewAppShared/ExampleJsInterop.cs

@@ -1,39 +0,0 @@
-using Microsoft.JSInterop;
-using System;
-using System.Threading.Tasks;
-
-namespace WebviewAppShared
-{
-    // This class provides an example of how JavaScript functionality can be wrapped
-    // in a .NET class for easy consumption. The associated JavaScript module is
-    // loaded on demand when first needed.
-    //
-    // This class can be registered as scoped DI service and then injected into Blazor
-    // components for use.
-
-    public class ExampleJsInterop : IAsyncDisposable
-    {
-        private readonly Lazy<Task<IJSObjectReference>> moduleTask;
-
-        public ExampleJsInterop(IJSRuntime jsRuntime)
-        {
-            moduleTask = new(() => jsRuntime.InvokeAsync<IJSObjectReference>(
-               "import", "./_content/WebviewAppShared/exampleJsInterop.js").AsTask());
-        }
-
-        public async ValueTask<string> Prompt(string message)
-        {
-            var module = await moduleTask.Value;
-            return await module.InvokeAsync<string>("showPrompt", message);
-        }
-
-        public async ValueTask DisposeAsync()
-        {
-            if (moduleTask.IsValueCreated)
-            {
-                var module = await moduleTask.Value;
-                await module.DisposeAsync();
-            }
-        }
-    }
-}

+ 0 - 3
src/Components/WebView/Samples/WebviewAppShared/SharedComponent.razor

@@ -1,3 +0,0 @@
-<div class="my-component">
-    This component is defined in the <strong>WebviewAppShared</strong> package.
-</div>

+ 0 - 6
src/Components/WebView/Samples/WebviewAppShared/SharedComponent.razor.css

@@ -1,6 +0,0 @@
-.my-component {
-    border: 2px dashed red;
-    padding: 1em;
-    margin: 1em 0;
-    background-image: url('background.png');
-}

+ 0 - 16
src/Components/WebView/Samples/WebviewAppShared/WebviewAppShared.csproj

@@ -1,16 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Razor">
-
-  <PropertyGroup>
-    <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
-  </PropertyGroup>
-
-  
-  <ItemGroup>
-    <SupportedPlatform Include="browser" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.Web" />
-  </ItemGroup>
-
-</Project>

+ 0 - 1
src/Components/WebView/Samples/WebviewAppShared/_Imports.razor

@@ -1 +0,0 @@
-@using Microsoft.AspNetCore.Components.Web

BIN
src/Components/WebView/Samples/WebviewAppShared/wwwroot/background.png


+ 0 - 6
src/Components/WebView/Samples/WebviewAppShared/wwwroot/exampleJsInterop.js

@@ -1,6 +0,0 @@
-// This is a JavaScript module that is loaded on demand. It can export any number of
-// functions, and may import other JavaScript modules if required.
-
-export function showPrompt(message) {
-  return prompt(message, 'Type anything here');
-}