コード例 #1
0
        private void AddTab()
        {
            var newTab = PivotMain.AddTab();

            newTab.Tag = PivotMain.SelectedWebViewItem;

            currentWebView = PivotMain.SelectedWebView;
            ToolTipService.SetToolTip(newTab.HeaderTextBlock, newTab.HeaderTextBlock.Text);

            currentWebView.NavigationStarting  += currentWebView_NavigationStarting;
            currentWebView.NavigationCompleted += currentWebView_NavigationCompleted;
            currentWebView.ContentLoading      += currentWebView_ContentLoading;
            currentWebView.DOMContentLoaded    += currentWebView_DOMContentLoaded;
            currentWebView.NewWindowRequested  +=
                new TypedEventHandler <WebView, WebViewNewWindowRequestedEventArgs>(currentWebView_NewWindowRequested);
            currentWebView.ContainsFullScreenElementChanged += currentWebView_ContainsFullScreenElementChanged;
            currentWebView.PermissionRequested += currentWebView_PermissionRequested;
            currentWebView.ScriptNotify        += currentWebView_ScriptNotify;
        }
コード例 #2
0
 private void CloseTabAppBarButton_Click(object sender, RoutedEventArgs e)
 {
     PivotMain.CloseCurrentTab();
 }