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

Why does the WebView2 for .NET provide the CoreWebView2CompositionController but dose not implement its interfaces? #4630

Open
XuanchenLin opened this issue Jun 14, 2024 · 0 comments
Assignees
Labels
feature request feature request

Comments

@XuanchenLin
Copy link

Describe the feature/enhancement you need

Previously, I developed a WinForm user interface framework called NanUI, which can use HTML/CSS/JS to desgin the user interface of the application. It can be understood as the WinForm version of Electron. This framework is based on CEF. Recently, I want to switch the HTML rendering component from CEF to WebView2 to reduce the size of the application after release.

I have completed the code using the DirectComposition API in WinForm. According to the API reference document of WebView2, I simply thought that I only needed to create a CoreWebView2CompositionController and provide a ContainerVisual for its RootTarget property to successfully complete my goal. But when I did this, I found that CoreWebView2CompositionController did not provide the CoreWebView2 property, so I couldn't even use the Nevigate method to specify a target URL. Of course, many methods and properties provided in the CoreWebView2Controller object are missing in CoreWebView2CompositionController, such as the Bounds property for setting the size of WebView2 and the NotifyParentWindowPositionChanged method for notifying WebView2 when the position of parent window changed.

My question is, will these properties and methods missing in CoreWebView2CompositionController be provided in future updates?

The scenario/use case where you would use this feature

The reason for using CoreWebView2CompositionController instead of directly using WebView2 control is to achieve the goal of compositing webpage (possibly with transparent background) with window material effects (such as Mica effect in Windows 11).

How important is this request to you?

Critical. My app's basic functions wouldn't work without it.

Suggested implementation

I don't know why these missing properties and methods are not provided in CoreWebView2CompositionController. Is it because the WebView2 development team thinks it is unnecessary?

What does your app do? Is there a pending deadline for this request?

I want to use WebView2 to render a web page and composite it with a WinForm as the user interface of the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request
Projects
None yet
Development

No branches or pull requests

2 participants