超链接跳转问题

名字全都被占用了 2012-09-17 09:35:10
刚接触sliverlight,超链接遇见了问题,希望各位大神能帮忙看下,具体如下:
我在app.xmal里面添加了
<Border x:Name="ContentBorder" >
<navigation:Frame x:Name="ContentFrame">
<navigation:Frame.UriMapper>
<uriMapper:UriMapper>
<uriMapper:UriMapping Uri="" MappedUri="/MainPage.xaml"/>
<uriMapper:UriMapping Uri="/{pageName}" MappedUri="/test/{pageName}.xaml"/>
</uriMapper:UriMapper>
</navigation:Frame.UriMapper>
</navigation:Frame>
</Border>

然后在一个系统生成的MainPage.xaml里面添加一个超链接按钮
<HyperlinkButton Content="test" Width="34" Foreground="Black" FontSize="13.333" FontWeight="Bold" NavigateUri="/testPage" TargetName="ContentFrame"/>

但是这样跳转的时候就说找不到指定的路径,网页里面显示的uri是http://localhost:3231/testPage
然后我修改超链接按钮的值,把引导地址改为
<HyperlinkButton Content="test" Width="34" Foreground="Black" FontSize="13.333" FontWeight="Bold" NavigateUri="/test/testPage.xaml"/>
但是结果还是不行,这时候网页里面显示的uri是http://localhost:3231/test/testPage.xaml


具体提示的错误如下:
无法找到资源。

说明: HTTP 404。您正在查找的资源(或者它的一个依赖项)可能已被移除,或其名称已更改,或暂时不可用。请检查以下 URL 并确保其拼写正确。

请求的 URL: /test/testPage.xaml

弄了好几天,都没能解决,希望各位大神帮帮忙……先谢谢了


...全文
138 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Architecture Net 2012-09-17
  • 打赏
  • 举报
回复
楼主可以参考:
http://www.cnblogs.com/chengxingliang/archive/2011/05/05/2036861.html

8,735

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧