Skip to content
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

Build a BlazorWebView native control for .NET MAUI #29055

Closed
2 of 3 tasks
mkArtakMSFT opened this issue Jan 5, 2021 · 10 comments
Closed
2 of 3 tasks

Build a BlazorWebView native control for .NET MAUI #29055

mkArtakMSFT opened this issue Jan 5, 2021 · 10 comments
Assignees
Labels
affected-most This issue impacts most of the customers area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-desktop This issue is related to Blazor Desktop severity-major This label is used by an internal tool
Milestone

Comments

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Jan 5, 2021

This control is going to be supported on Windows and Mac.
This is going to enable hosting Blazor desktop apps natively in WinUI and Catalyst apps.

  • Create a new project in dotnet/AspNetCore, get it building and start moving code from xamarin/mobileblazorbindings
  • Add some testing mechanism (automated)
  • Figure out how IPC will work, write a spec for it and implement
@mkArtakMSFT mkArtakMSFT added enhancement This issue represents an ask for new feature or an enhancement to an existing one area-blazor Includes: Blazor, Razor Components feature-blazor-desktop This issue is related to Blazor Desktop labels Jan 5, 2021
@mkArtakMSFT mkArtakMSFT added this to the Next sprint planning milestone Jan 5, 2021
@ghost
Copy link

ghost commented Jan 5, 2021

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@rogihee
Copy link
Contributor

rogihee commented Jan 13, 2021

  • Will it be possible to consume this new BlazorWebView from both WinUI and WPF/WinForms? WinUI has a long, long time of becoming stable and less deployment surface as WPF/WinForms apps.
  • I assume this will be built using WebView2 under the hood, will the underlying options of that control (e.g. disable dev tools, fullscreen) be exposed?

@Eilon
Copy link
Member

Eilon commented Jan 13, 2021

Hi @rogihee our first push towards production will be to focus on Windows using WinUI3 + WebView2 and on macOS using Catalyst + WKWebView. While doing those, we certainly won't block any other scenarios, such as Windows+WPF+WebView2 and we'll want to have support for those via projects such as Mobile Blazor Bindings, which at this time are pre-production quality.

@Eilon
Copy link
Member

Eilon commented Jan 13, 2021

Oh and for this: Will the underlying WebView2 be exposed?

I would certainly imagine so. We haven't even begun the final design of this, but I think that exposing WebView2 in some reasonable manner would be quite important for many scenarios.

@Code-DJ
Copy link

Code-DJ commented Jan 21, 2021

Hi @Eilon will it support popup dialog window using window.open. Not sure if extra logic will have to be baked into the framework to support this. Just flagging it here.

@Eilon
Copy link
Member

Eilon commented Jan 22, 2021

I think opening popups is done via an event that triggers. It's something we'll have to look at to see the best way to support it.

@rogihee
Copy link
Contributor

rogihee commented Jan 27, 2021

Will Blazor run in the native (AOT-ed!) runtime? Like in the exp. mobile bindings one runtime for both app and webview2 control in the app?

With the memory and performance benefits it would then likely outperform any JavaScript speed in CPU/Memory size (like Steve's experiment showed), making this control a potential Electron killer. That would be something!

@Eilon
Copy link
Member

Eilon commented Jan 27, 2021

Will Blazor run in the native (AOT-ed!) runtime?

All the app's Blazor code will run in the platform's .NET runtime. So on Windows that means .NET Core 6. On macOS we're trying to figure out if that's Mono or .NET Core. It does not run any .NET code in the WebView - it just does some JS/.NET interop between .NET and the WebView.

@mkArtakMSFT mkArtakMSFT moved this from Preview 2 (CC: 25th Feb) to In Progress in ASP.NET Core Blazor & MVC 6.0 Feb 4, 2021
@mkArtakMSFT mkArtakMSFT moved this from In Progress to Preview 2 (CC: 19th Feb) in ASP.NET Core Blazor & MVC 6.0 Feb 22, 2021
@mkArtakMSFT mkArtakMSFT moved this from Preview 2 (CC: 19th Feb) to In Progress in ASP.NET Core Blazor & MVC 6.0 Feb 22, 2021
@danroth27 danroth27 changed the title Build a BlazorWebView native control Build a BlazorWebView native control for .NET MAUI Mar 15, 2021
@danroth27 danroth27 added affected-most This issue impacts most of the customers severity-major This label is used by an internal tool labels Mar 15, 2021 — with ASP.NET Core Issue Ranking
@Eilon
Copy link
Member

Eilon commented Apr 15, 2021

The initial work for .NET MAUI for Windows/iOS/macOS/Android is merged into the .NET MAUI repo! dotnet/maui#654

@Eilon
Copy link
Member

Eilon commented Apr 20, 2021

Closing this because the bulk of the work is done, and no more work should be needed in this repo. There are some remaining work items for preview 4, but they will be done in the https://github.com/dotnet/maui repo.

@Eilon Eilon closed this as completed Apr 20, 2021
ASP.NET Core Blazor & MVC 6.0 automation moved this from In Progress to Done Apr 20, 2021
@ghost ghost added Done This issue has been fixed and removed Working labels Apr 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-most This issue impacts most of the customers area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-desktop This issue is related to Blazor Desktop severity-major This label is used by an internal tool
Projects
No open projects
Development

No branches or pull requests

7 participants