我想在CefSharp的WPF中设置新窗口的属性,例如showIntaskbar == false。
我已经实现了ILifeSpanHandler的接口,这是我的代码
public bool OnBeforePopup(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser)
{
newBrowser = null;
Window newWindow = (Window)HwndSource.FromHwnd(windowInfo.WindowHandle).RootVisual;
newWindow.ShowInTaskbar = false;
return false;
}
但出现错误,windowinfo.WindowHandle的值唤醒0x0000000 请帮助我。