-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could this be made to work with BlazorWebView - in Hybrid Wpf App #9
Comments
Interesting idea. Not something I've tired, so it's unclear if it's possible.
What is the stack trace for the exception? If you can, create a new example project then create a |
Ok, I will try to recreate this in a smaller, boilder plate WPF hybrid blazor app. Please give me couple of days. |
Hi, please see attached Blazor.AspNetCore.Bridge.zip Normall, Blazor server apps start with "_host.cshtml", a razor view that can dynamically configure the SPA page. Micrsoft seems to go in the direction of supporting Client Side Rendering tech on the Server. Server-side rendering with Blazor components What they may not support is Client-side rendering of Server razor views. I had raised this with MS |
You may use the following libray to add some components to "index.cshtml" for testing purposes |
I don't review zip files. Needs to be a PR against this repo that adds a blazor example that reproduces the exception you've reported above. |
oh, well. I am not familiar with how to do that as this is not simple few lines of bug. This is an architectural enhancement - that is the reason I gave you the source for the full project. I thought I could peek your interest. Sorry! I will seek another route. |
|
In MainWindow.xaml, I replace the webview control and took necessary steps in wiring the resource handlers. I get 'System.UriFormatException' when the view gets rendered.
New
<blazor:BlazorWebView x:Name="webView" HostPage="wwwroot\index.html" Services="{StaticResource services}"> <blazor:BlazorWebView.RootComponents> <blazor:RootComponent Selector="#app" ComponentType="{x:Type local:Main}" /> </blazor:BlazorWebView.RootComponents> </blazor:BlazorWebView>
Old
<wv2:WebView2 Grid.Row="0" x:Name="Browser" Source="https://cefsharp.test/" />
my Index.cshtml
`
<title>BlazorApp2Demo</title> @(await Html.RenderComponentAsync(RenderMode.Static, new { SectionName = "HeadCss" }))The text was updated successfully, but these errors were encountered: