导航到Silverlight中的其他程序集

时间:2012-10-14 18:44:04

标签: silverlight navigation silverlight-5.0

我正在尝试导航到位于不同程序集中的页面但没有成功。

我制作了一个非常简单的Silverlight导航应用程序说明了我的观点:

My Project http://s17.postimage.org/46y18vkrj/Sin_t_tulo.jpg

我只有一个Hyperlink

NavigateUri="/PageClassLibrary;component/Pages/PageInLibrary.xaml"

在调用页面( MainNavigationApp 中的 MainPage.xaml )中,我现在有一个没有UriMappings的Frame。

 <Grid x:Name="LayoutRoot">

      <navigation:Frame x:Name="ContentFrame"
                        Style="{StaticResource ContentFrameStyle}"
                        Navigated="ContentFrame_Navigated"
                        NavigationFailed="ContentFrame_NavigationFailed">
      </navigation:Frame>

      <Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}">

         <StackPanel x:Name="LinksStackPanel" Style="{StaticResource LinksStackPanelStyle}">

            <HyperlinkButton x:Name="Link3"
                             Style="{StaticResource LinkStyle}"
                             NavigateUri="/PageClassLibrary;component/Pages/PageInLibrary.xaml"
                             TargetName="ContentFrame"
                             Content="page in a class library" />
         </StackPanel>

      </Grid>

    </Grid>

但是当我运行它时,我收到一条错误消息,指出找不到该页面:

  

找不到页面:“/ PageClassLibrary ;component/Pages/PageInLibrary.xaml”

我甚至修改了 MainNavigationApp 依赖项,检查取决于PageClassLibrary ,但它没有改善结果。

我没有想法了。有人有提示吗?

这是解决方案:

https://skydrive.live.com/#cid=B79120F33F3A7A64&id=B79120F33F3A7A64%21105

1 个答案:

答案 0 :(得分:0)

AAAhhh!,解决方案就在我面前。只是添加了对大会的参考。 DAH!