Bisjob
Bisjob

Reputation: 828

MAUI Blazor - Use Webview as component

I have a MAUI .NET6 application with blazor pages and components, and I would like to display a kind of web browser inside a page, in order to display some internet content.

I tried to use the BlazorWebView, but I couldn't figure out how to use a XAML component inside a blazor component.

For now I have an iframe, but some internet content is blocked. I would like to have like a real browser.

Have you some ideas how to achieve this ?

Upvotes: 2

Views: 2219

Answers (1)

Gerald Versluis
Gerald Versluis

Reputation: 34073

You cannot embed XAML inside of Razor pages. Whenever you are inside of a BlazorWebView you will need to find a "web way" to fix whatever you're doing. So that would indeed be an iframe or something like that.

Another way around it would be to navigate to a .NET MAUI native page and show a WebView on that, but seeing how you describe things, that is not what you want.

Upvotes: 1

Related Questions