Ejemplo n.º 1
0
 public void Show()
 {
     if (!show)
     {
         web        = new WebViewX();
         window     = Window.GetWindow(this);
         hwndSource = PresentationSource.FromVisual(this) as HwndSource;
         if (hwndSource != null)
         {
             hook = new HwndSourceHook(WndProc);
             hwndSource.AddHook(hook);
         }
         web.Owner = window;
         web.Show();
         show = true;
         render_web();
     }
 }
Ejemplo n.º 2
0
 public void Hide()
 {
     if (hwndSource != null)
     {
         hwndSource.RemoveHook(hook);
     }
     if (web != null)
     {
         //try
         //{
         web.WebBrowser.Dispose();
         web.Close();
         //}
         //catch { }
         web = null;
     }
     show = false;
 }