WPF WebBrowser - detecting redirects?

前端 未结 1 956
傲寒
傲寒 2020-12-11 09:29

I am trying to implement a simple Facebook login flow using WPF. It turns out that I need to use some sort of embedded browser within the application if the application is a

相关标签:
1条回答
  • 2020-12-11 09:58

    I was having the saving problem with the WPF Sample in the SDK today. I figured it was a problem with the WPF Webbrowser control (like you had infered). So I used the windows.forms.webbrowser instead of the WPF webcontrol. It is a simple fix.

     System.Windows.Forms.Integration.WindowsFormsHost host =
            new System.Windows.Forms.Integration.WindowsFormsHost();
     _webBrowser = new System.Windows.Forms.WebBrowser();
     host.Child = _webBrowser;
    
     this.grid1.Children.Add(host);
     _webBrowser.Navigated += new WebBrowserNavigatedEventHandler(webBrowser_Navigated);
     _webBrowser.Navigate(_navigateUrl.AbsoluteUri);
    
    0 讨论(0)
提交回复
热议问题