Beispiel #1
0
        private BrowserControl AddBrowser(string url, bool isFallbackUrlRequired = false)
        {
            BrowserControl browserControl = new BrowserControl();

            if (isFallbackUrlRequired)
            {
                browserControl.BrowserFallbackUrlEvent += new System.Action(this.BrowserFallbackUrlEvent);
            }
            browserControl.BrowserLoadCompleteEvent += new System.Action(this.BrowserLoadCompleteEvent);
            browserControl.BrowserLoadErrorEvent    += new System.Action <string, string>(this.BrowserLoadErrorEvent);
            browserControl.InitBaseControl(url, 0.0f);
            browserControl.Visibility   = Visibility.Visible;
            browserControl.ParentWindow = this.ParentWindow;
            this.mContentGrid.Children.Add((UIElement)browserControl);
            return(browserControl);
        }