如何让webbrowser控件支持Html5
1个回答
展开全部
个叫CefGlue的东东,是对webkit的封装,就能满足C#winform对html5的支持了
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xilium.CefGlue;
namespace Xilium.CefGlue.WindowsForms
{
public class BsLifeSpanHandler : CefLifeSpanHandler
{
private CefWebClient bClient;
public BsLifeSpanHandler(CefWebClient bc)
{
bClient = bc;
}
protected override void OnAfterCreated(Xilium.CefGlue.CefBrowser browser)
{
base.OnAfterCreated(browser);
bClient.Created(browser);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xilium.CefGlue;
namespace Xilium.CefGlue.WindowsForms
{
public class BsLifeSpanHandler : CefLifeSpanHandler
{
private CefWebClient bClient;
public BsLifeSpanHandler(CefWebClient bc)
{
bClient = bc;
}
protected override void OnAfterCreated(Xilium.CefGlue.CefBrowser browser)
{
base.OnAfterCreated(browser);
bClient.Created(browser);
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询