项目中需要在新的浏览器上显示产品快照(不是childwindow). 客户希望添加一个按钮自动关闭浏览器,不用点击浏览器上的 X。 使用下面的代码工作
private void closeBtn_Click(object sender, RoutedEventArgs e) { HtmlPage.Window.Eval("window.open('','_self');window.close();"); }