silverlight PopupWindow Resizeable兼容问题
下方第一段代码,在ie11中Resizeable无法生效,而在chrome中运行正常。
1 HtmlPopupWindowOptions options = new HtmlPopupWindowOptions(); 2 options.Location = false; 3 options.Menubar = false; 4 options.Resizeable = true; 5 options.Toolbar = false; 6 options.Status = true; 7 options.Scrollbars = true; 8 options.Directories = false; 9 options.Top = 50; 10 options.Left = 50; 11 options.Width = 600; 12 options.Height = 400; 13 Uri rdpUri = new Uri(@"http://www.baidu.com"); 14 HtmlPage.PopupWindow(rdpUri, "_blank", options);
可以通过System.Windows.Browser.HtmlPage.Window.Eval(string code)方法在浏览器中执行javascript。
1 string jsStr = string.Format("window.open('{0}', '{1}', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=1,width=600,height=400,left=50,top=50')", "http://www.baidu.com", "MyWindow"); 2 System.Windows.Browser.HtmlPage.Window.Eval(jsStr);