public static void Show(string address)
        {
            var window = new BrowserWindow();

            window.browser.Load(address);
            window.Show();
        }
        public static void Popup(string url, bool showNavigationBar = true)
        {
            var window = new BrowserWindow();
            var vModel = window.DataContext as BrowserWindowViewModel;

            if (vModel == null)
            {
                window.Close();
                return;
            }

            if (!showNavigationBar)
            {
                window.browser.OnCreatedNewWindow += (s, e) =>
                {
                    e.CancelPopup = false;
                };
            }

            vModel.ShowNavigationBar = showNavigationBar;
            vModel.LoadUrl(url);
            window.Show();
        }
 private void OnCreateNewBrowser(object sender, FlashBrowser.Handlers.LifeSpanHandler.NewBrowserEventArgs e)
 {
     e.Handled = true;
     BrowserWindow.Show(e.TargetUrl);
 }
Beispiel #4
0
 private void OnCreateNewBrowser(object sender, LifeSpanHandler.NewBrowserEventArgs e)
 {
     e.Handled = true;
     Application.Current.Dispatcher.Invoke(() => BrowserWindow.Show(e.TargetUrl));
 }