Exemple #1
0
        private void OnBrowserLoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
        {
            for (var index = 0; index < _tabs.Count; index++)
            {
                if (!_tabs[index].Equals(sender))
                {
                    continue;
                }
                var tabDetails = GetTabDetails(index);
                if (tabDetails.IsLoading == e.IsLoading)
                {
                    return;
                }

                tabDetails.IsLoading = e.IsLoading;
                SendPropertyChange(@"isLoading", e.IsLoading, index);
                if (!e.IsLoading)
                {
                    CurrentBrowser.Focus();
                }

                if (tabDetails.CanGoForward != e.CanGoForward)
                {
                    tabDetails.CanGoForward = e.CanGoForward;
                    SendPropertyChange(@"canGoForward", e.CanGoForward, index);
                }

                if (tabDetails.CanGoBack == e.CanGoBack)
                {
                    return;
                }

                tabDetails.CanGoBack = e.CanGoBack;
                SendPropertyChange(@"canGoBack", e.CanGoBack, index);
            }
        }
Exemple #2
0
 public void ForceFocus()
 {
     CurrentBrowser.Focus();
 }