没有浏览器控件类的C#Web浏览器

我正在尝试制作一个高级的C#Web浏览器(导航,收藏夹,主页,历史记录,选项卡),而不使用Visual Studio中的WebBrowser控件.我在网上找不到任何教程.任何可以帮助教程的人?

到目前为止我已经开始了

 string urlAddress = "http://google.com";

 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlAddress);
 HttpWebResponse response = (HttpWebResponse)request.GetResponse();

 if (response.StatusCode == HttpStatusCode.OK)
{
   Stream receiveStream = response.GetResponseStream();
   StreamReader readStream = null;

   if (response.CharacterSet == null)
  {
      readStream = new StreamReader(receiveStream);
  }
   else
  {
      readStream = new StreamReader(receiveStream,                                                    Encoding.GetEncoding(response.CharacterSet));
  }

   string data = readStream.ReadToEnd();

   response.Close();
   readStream.Close();
}

最佳答案
GeckoFX
CefSharp是最新的软件包(您可以在NuGet上找到它们)在您的应用程序中嵌入浏览器.

我认为从零开始编写Web浏览器应该太难和昂贵.

点赞