protected void OnCreateWindow(WebView webview) { var tab = new WebViewTab(webview); TabControl tabs = this.FindTabControl(); ((AvaloniaList <object>)tabs.Items).Add(tab); tabs.SelectedItem = tab; }
private void AddTab(bool useGlobalContext) { WebViewTab viewTab; if (useGlobalContext) { viewTab = new WebViewTab(); viewTab.WebView.Navigated += WebView_Navigated; ((AvaloniaList <object>)tabs.Items).Add(viewTab); viewTab.Title = "about:blank"; tabs.SelectedItem = viewTab; } else { //var cx = new CefRequestContext(new CefRequestContextSettings()); //tabs.Controls.Add(new WebViewTab(new CefBrowserSettings(), cx)); } }
public WebViewTabTitle(WebViewTab tab) { _tab = tab; }