Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.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
windows phone页面XAML预览未在Blend和Visual studio中显示_Xaml_Visual Studio 2013_Windows Phone 8.1_Blend_Win Universal App - Fatal编程技术网

windows phone页面XAML预览未在Blend和Visual studio中显示

windows phone页面XAML预览未在Blend和Visual studio中显示,xaml,visual-studio-2013,windows-phone-8.1,blend,win-universal-app,Xaml,Visual Studio 2013,Windows Phone 8.1,Blend,Win Universal App,我已经在通用应用程序项目和windows phone 8.1部分的mainpage.xaml中编写了代码。visual studio和blend中的预览显示为空。照片附呈。 没有从后c代码设置文本块的文本。所有代码都在这里设置。 还附加了Windows phone输出。 下面是代码 <Page x:Class="PakistanNewspapers.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presenta

我已经在通用应用程序项目和windows phone 8.1部分的mainpage.xaml中编写了代码。visual studio和blend中的预览显示为空。照片附呈。 没有从后c代码设置文本块的文本。所有代码都在这里设置。 还附加了Windows phone输出。 下面是代码

<Page 
x:Class="PakistanNewspapers.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:PakistanNewspapers"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<Hub>
    <Hub.HeaderTemplate>
        <DataTemplate>
            <TextBlock x:Name="lblHeader" Text="Pakistani Newspapers"></TextBlock>
        </DataTemplate>
    </Hub.HeaderTemplate>
<HubSection Header="Urdu Newspapers" >
    <DataTemplate>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Vertical">
                <GridView>
                    <GridView.ItemTemplate>
                        <DataTemplate>

                            <StackPanel Margin="0,0,0,0" Orientation="Horizontal">

                                <Image x:Name="txtNewspaperImage" Height="60" Width="60" VerticalAlignment="Center" Margin="0,0,10,0"/>
                                <StackPanel Orientation="Vertical">
                                    <TextBlock x:Name="txtNewspaperHeader" TextWrapping="Wrap" Foreground="{StaticResource ApplicationForegroundThemeBrush}" FontSize="14.667" FontWeight="Light" Width="200" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe UI"/>
                                    <TextBlock x:Name="txtNewsHeader" TextWrapping="Wrap" Foreground="{StaticResource ApplicationForegroundThemeBrush}" FontSize="14.667" FontWeight="Light" Width="200" MaxHeight="20" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                </StackPanel>

                            </StackPanel>
                        </DataTemplate>

                    </GridView.ItemTemplate>
                </GridView>

            </StackPanel>
        </Grid>
    </DataTemplate>

</HubSection>

<HubSection Header="English Newspapers"/>

<HubSection Header="About"/>
</Hub>

visual studio和blend中的预览显示为:

尝试使用@sibbl链接显示MVVM的数据。我会调查的。但至少集线器标题没有显示仅绑定文本。为什么不显示?您的代码中是否有可能在设计时执行的代码?如果它因预期在运行时而崩溃,则可能导致设计器失败。尝试禁用所有后台代码,如果前端加载,请找到一种延迟加载的方法,使其仅在运行时加载