2012-11-29 79 views
0

我的应用程序中有一个XAML文件,我试图通过框架控件将其他XAML文件加载到框架中,但它不工作。我收到错误Content for the URI is invalid。当我运行应用程序时,该错误只是作为对话框错误弹出,因此没有可用的堆栈跟踪。将XAML加载到框架时出错

下面是我的“母版页”的代码:

<navigation:Page x:Class="SilverAIM.BusinessCenter.BusinessCenterMaster" 
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      mc:Ignorable="d" 
      xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
      d:DesignWidth="758" d:DesignHeight="480" 
      Title="BusinessCenterMaster Page"> 
    <Grid x:Name="LayoutRoot"> 
     <navigation:Frame Height="100" HorizontalAlignment="Left" Margin="0,248,0,0" Source="Test.xaml" Name="testFrame" VerticalAlignment="Top" Width="758" /> 
    </Grid> 
</navigation:Page> 

回答

0

得到它的工作使用,而不是ContentControl中帧。