Example #1
0
        protected void OnCreateWindow(WebView webview)
        {
            var        tab  = new WebViewTab(webview);
            TabControl tabs = this.FindTabControl();

            ((AvaloniaList <object>)tabs.Items).Add(tab);
            tabs.SelectedItem = tab;
        }
Example #2
0
        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));
            }
        }
Example #3
0
 public WebViewTabTitle(WebViewTab tab)
 {
     _tab = tab;
 }