WebView2Samples icon indicating copy to clipboard operation
WebView2Samples copied to clipboard

Tab Navigation in webview2

Open jcmontoya opened this issue 4 years ago • 2 comments

I have not been bale to find a sample for tab navigation in C#. The current control does not support tab navigation. I found a sample in C++ but it would help a lot of people having an example of how to create multiple tabs in the same app and pass the security context from tab to tab.

jcmontoya avatar Jun 08 '21 22:06 jcmontoya

Hey @jcmontoya - in general the model is to have 1:1 WebView2 to tab. If you use the same user data folder, the WebView2's will share the browser process and create separate renderer processes for the different sites, and this approximates the process model of the browser today. You can find out more about the process model here: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/process-model

champnic avatar Jun 09 '21 15:06 champnic

The integration is not fully there. Right-clicking links show Open in New Window and not Open in New Tab. Links opened in New Windows make the URL readonly.

The best sample of tabs is here. https://github.com/MicrosoftEdge/WebView2Browser

The browser sample lacks some of the other features from these WebView2Samples like password management.

tgraupmann avatar Sep 25 '23 18:09 tgraupmann