MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
452 stars 55 forks source link

Could you please make a C# version of the C++ Webview2Browser? #1107

Closed darbid closed 2 years ago

darbid commented 3 years ago

I have lots of questions about the Webview2Browser example, but I fear most are because I do not understand C++ well enough.

Would it be at all possible to make this as a C# example? Link to Github

champnic commented 3 years ago

Hey @darbid - we aren't currently investing in the WebView2Browser sample at this time. Do you want to try listing some of your questions here anyways?

darbid commented 3 years ago

@champnic thank you.

I thought I would create a C# example.

I have been a VB'er for years, this is actually my first C# project. My Options Browser does not always show up. I created an issue and am pretty sure it is a WPF related issue and not related to WebView2 / Airspace. Would love someone to have a look at what I am doing wrong.

My questions could relate to the creation of the History but right now I am just working out how Microsoft is doing it.

champnic commented 3 years ago

What do you mean by "Options Browser"? Using your sample code I was able to open the Settings page ("browser://options") and have it display and switch tabs as expected.

darbid commented 3 years ago

To reproduce

image

champnic commented 3 years ago

Aha. That's interesting. So it looks like you're getting around the airspace issue by also making the dropdown a separate WebView2. As soon as you switch tabs at all it stops being visible, but I noticed if you open another new tab then it starts appearing again... no idea yet why this is happening :) But might be related to the difference between creating a new tab and switching tabs.

darbid commented 3 years ago

So it looks like you're getting around the airspace issue by also making the dropdown a separate WebView2.

It does overcome the issue but to be fair the C++ version has 3 webviews as well.

As soon as you switch tabs at all it stops being visible, but I noticed if you open another new tab then it starts appearing again... no idea yet why this is happening :) But might be related to the difference between creating a new tab and switching tabs.

I think so too, and to be honest I think it is a WPF issue and not WebView2 issue. I am just hoping someone can point out my error.