
我正在开发框中在IE中测试我的页面,并且成功地使用了重定向页面
HTMLPage.Window.Navigate(New Uri("http://mytestBox02/")) 我把源代码的副本带到我的笔记本电脑上,其中VS2010的默认浏览器恰好是Chrome,令我惊讶的是我的链接无效.有时我看到它重定向,但它损坏了uri,它最终以mytestBox02 /的形式出现,因此它没有去除404,因为它缺少http://前缀.有时我得到一个例外.该例外的细节是
system.invalIDOperationException was caught Message=SetProperty Failed. StackTrace: at System.windows.browser.ScriptObject.SetProperty(String name,Object value) at System.windows.browser.ScriptObject.GetobjectForSafari(IntPtr IDentity,IntPtr handle,Type type,Boolean releaseReferenceOndispose) at System.windows.browser.ScriptObject.Getobject(IntPtr handle,Boolean ownsHandle,Boolean releaseReferenceOndispose) at System.windows.Hosting.ScriptingInterface.GetScriptParamValue(ScriptParam scriptParam) at System.windows.Hosting.ScriptingInterface.ConvertFromScriptParamAnddispose(ScriptParam scriptParam) at System.windows.browser.ScriptObject.TryInvoke(String name,Object[] args,Exception& error) at System.windows.browser.ScriptObject.Invoke(String name,Object[] args) at System.windows.browser.HTMLWindow.Navigate(Uri navigatetoUri,String target,String targetFeatures) at System.windows.browser.HTMLWindow.Navigate(Uri navigatetoUri) at popupwindow.MainPage.ChilDWindow_Closed(Object sender,EventArgs e) InnerException:
开发箱和我的笔记本电脑上的Silverlight 4.1.10111.0.
有什么想法在这里发生了什么?我不能完全确定我的客户将使用IE,所以我希望有一个解决方案.或者除了window.navigate之外我可以使用的更多交叉兼容的东西?我还没有找到任何东西..
解决方法 事实上,这可能是一个Chrome问题 – 我只是花了一天时间与它斗争.http://forums.silverlight.net/t/213769.aspx/1
http://stulic.blogspot.com/2009/08/javascript-locationhref-vs-silverlight.html
你可能需要使用某种JavaScript.
HTMLPage.Window.Eval("window.location.href = '<something>';");//orHTMLPage.Window.Eval("window.location.reload();"); 总结 以上是内存溢出为你收集整理的silverlight-4.0 – HtmlPage.Window.Navigate适用于IE但不适用于Chrome全部内容,希望文章能够帮你解决silverlight-4.0 – HtmlPage.Window.Navigate适用于IE但不适用于Chrome所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)