导航时的Silverlight NavigationFramework没有改变地址栏(不显示#标签) [英] Silverlight NavigationFramework is not changing address bar (no hashtags are displayed) when navigating

查看:236
本文介绍了导航时的Silverlight NavigationFramework没有改变地址栏(不显示#标签)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的导航框架和basicly了一个用于导航一帧。
我曾尝试与 mainFrame.JournalOwnership 打造成我想也许改变它可以连接到这一点,但没有什么变化。



由于导航相关的类结构是相当小的我有点疑惑这里什么我做错了,因为我想不出别的我可以改变,使导航的工作。



我不使用导航模板,我用它自由的风格很像这个视频教程的 http://www.silverlight.net/learn/videos/all/navigation-framework/ 如果有人可能会问。



谢谢提前。它真的很挣扎。请帮助



我曾尝试只用我的主机页面,并呼吁简单navigatate空测试页重现错误的另一种解决方案,它能正常工作,所以我现在得到了新的问题



也许有正在被导航框架设置,我的SL页面的HTML被禁用的哈希标签的方法吗?

编辑:我已经测试过把我的工作测试XAP我的HTML页面,而不是我不工作的整个应用程序,并它没有更新这个页面上井号标签。所以,现在其明确的东西是错误的html页面,可能是什么呢?


解决方案

终于找到了这个问题。
原来这里是使用Silverlight中的iframe使用此操作,
我添加以下代码到我的aspx页面后,它开始像魔术工作的关键。

 < IFRAME ID =_ sl_historyFrame的风格=能见度:隐藏;高度:0像素,宽度:0像素;边界:0像素>< / IFRAME> 



如下所述:的 http://msdn.microsoft.com/en-us/library/cc838245(VS.95)的.aspx


I am using Navigation framework and basicly got one frame that is used for navigation. I have tried playing with mainFrame.JournalOwnership cause I thought maybe changing it might be connected to this but nothing changes.

Since navigation related classes structure is quite small I am a little puzzled here about what am I doing wrong cause I cannot think of anything else I can change to make navigation work.

I am not using Navigation template, I use it free style much like in this video tutorial http://www.silverlight.net/learn/videos/all/navigation-framework/ if someone might wonder.

Thanks in advance. Really struggling with it. Please help

I have tried to reproduce bug in another solution by using just my mainframe page and calling simple navigatate to empty test page and it worked fine so I now got new questions.

Maybe there is a way that my SL page HTML is disabling hash tags being set by navigation framework?

EDIT: I have tested putting my working test XAP on my html page instead of my whole application that is not working, and it didnt update hashtags on this page. So now its clear something is wrong with html page, what could be it?

解决方案

Finally found out the problem. Turns out the key here was iframe used by silverlight for using this operation, after I added following code to my aspx page it started to work like magic.

<iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>

as stated here: http://msdn.microsoft.com/en-us/library/cc838245(VS.95).aspx

这篇关于导航时的Silverlight NavigationFramework没有改变地址栏(不显示#标签)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆