silverlight3 navigation:Frame 导航问题
<navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" Source="/Home" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
<navigation:Frame.UriMapper>
<uriMapper:UriMapper x:Name="urlMaper">
<uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
<uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
<uriMapper:UriMapping Uri="/{pageName}/{hwj383}" MappedUri="/Views/{pageName}.xaml?Id={hwj383}"/>
</uriMapper:UriMapper>
</navigation:Frame.UriMapper>
</navigation:Frame>
在About页面有一个按钮:
this.NavigationService.Navigate(new Uri(String.Format("/New/{0}", new Random().Next()), UriKind.RelativeOrAbsolute));
但是提示Page Not Found (/New/123456)
如果输入
this.NavigationService.Navigate(new Uri("/New", UriKind.RelativeOrAbsolute));
这样就没问题.
谢谢.