窗口电话8应用程序中的intalizied对象发生异常

时间:2014-10-30 05:07:26

标签: c# asp.net wpf xaml windows-phone-8

我无权在stackoverflow上传错误图像。您可以在此链接上看到此错误图像 http://s24.postimg.org/5lduiutqd/error.jpg 我正在窗口手机8中创建Facebook菜单,显示编译时错误。基本上我正在使用用户控件创建一个Facebook菜单并将其调用到mainframe.xaml ...

用户控制码

 <UserControl x:Class="test.UserControls"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                        xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        xmlns:library="clr-namespace:SlideView.Library;assembly=SlideView.Library"
                        mc:Ignorable="d"
                        shell:SystemTray.IsVisible="False"
  >


<Grid x:Name="LayoutRoot" Grid.Row="0">
    <library:SlideApplicationFrame Header="Test App" Background="White">
        <library:SlideApplicationFrame.LeftContent>
            <TextBox Name="ss" Width="200"></TextBox>
        </library:SlideApplicationFrame.LeftContent>
        <library:SlideApplicationFrame.RightContent>
            <TextBox Name="sss" Width="200"></TextBox>
        </library:SlideApplicationFrame.RightContent>
    </library:SlideApplicationFrame>
</Grid>

Mainframe.xaml代码

<phone:PhoneApplicationPage
    x:Class="test.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
     xmlns:local="clr-namespace:test"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <local:UserControls Name="SSS">          
        </local:UserControls>
    </Grid>  
</phone:PhoneApplicationPage>

0 个答案:

没有答案