Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# windows phone 8-找不到xaml错误_C#_Windows Phone 8 - Fatal编程技术网

C# windows phone 8-找不到xaml错误

C# windows phone 8-找不到xaml错误,c#,windows-phone-8,C#,Windows Phone 8,我的申请书有两页。这两个页面都位于视图文件夹SplashScreen.xaml和GetPhoneNumber.xaml中。我指定 运行此代码后,我得到一个错误=>xaml未找到。我在应用程序的根目录中创建了2个xaml文件,然后重复这个场景,问题就不存在了 SplashScreen.xaml.cs SplashScreen.xaml 我和你一样创建了相同的文件夹和文件结构。您的文件名有问题。我刚刚将Splashscreen.xaml重命名为Abc.xaml,还重命名了所有相关类。那对我来说很好。

我的申请书有两页。这两个页面都位于视图文件夹SplashScreen.xaml和GetPhoneNumber.xaml中。我指定

运行此代码后,我得到一个错误=>xaml未找到。我在应用程序的根目录中创建了2个xaml文件,然后重复这个场景,问题就不存在了

SplashScreen.xaml.cs SplashScreen.xaml
我和你一样创建了相同的文件夹和文件结构。您的文件名有问题。我刚刚将Splashscreen.xaml重命名为Abc.xaml,还重命名了所有相关类。那对我来说很好。Splashscreen这个词可能是由Windows phone操作系统保留的。目前,这是您的问题的解决方案。

您需要指定xaml中的确切路径。它被指定为Ghavamin.View.SplashScreen,这意味着您的SplashSceen.xaml存在于视图文件夹中。因此,在调用Navigate方法时,如下面所示更改xaml或包含确切的路径

 <phone:PhoneApplicationPage
x:Class="Ghavamin.SplashScreen"
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"  Background="{StaticResource GrayBrush}">
        <Image Height="169" Margin="41,255,57,344" Width="382" HorizontalAlignment="Center" VerticalAlignment="Center" Source="/Image/splash.jpg"/>
    </Grid>

</phone:PhoneApplicationPage>
NavigationService.NavigateNewURI/View/your_page.xaml,UriKind.Relative?
<phone:PhoneApplicationPage
x:Class="Ghavamin.View.SplashScreen"
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"  Background="{StaticResource GrayBrush}">
        <Image Height="169" Margin="41,255,57,344" Width="382" HorizontalAlignment="Center" VerticalAlignment="Center" Source="/Image/splash.jpg"/>
    </Grid>

</phone:PhoneApplicationPage>
 <phone:PhoneApplicationPage
x:Class="Ghavamin.SplashScreen"
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"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"  Background="{StaticResource GrayBrush}">
        <Image Height="169" Margin="41,255,57,344" Width="382" HorizontalAlignment="Center" VerticalAlignment="Center" Source="/Image/splash.jpg"/>
    </Grid>

</phone:PhoneApplicationPage>