图像显示在VS2013的设计器视图中,但未在wp8中显示在手机上

时间:2014-05-27 08:24:35

标签: image xaml windows-phone-8

我想在应用程序的页面内显示一个图像..它显示在VS2013的设计器视图中,但是当我在手机上运行应用程序时它没有显示..

以下是xaml:

<Grid x:Name="LayoutRoot" Background="#FFFFD9">
        <Grid.RowDefinitions>
            <RowDefinition Height="768"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="0,10,12,623">

            <TextBlock Text="" Style="{StaticResource PhoneTextNormalStyle}"/>
            <Image HorizontalAlignment="Left" Height="118" Margin="10,0,0,0" VerticalAlignment="Top" Width="448" Source="images/brandlogo.jpg" RenderTransformOrigin="0.729,0.434" Stretch="Fill"/>

        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

            <StackPanel Grid.Row="0" Margin="170,628,0,0">

                <Image HorizontalAlignment="Left" Height="88" Margin="10,0,0,0" VerticalAlignment="Top" Width="100" Source="images/statusoffline.bmp" RenderTransformOrigin="0.729,0.434" Stretch="Fill"/>

            </StackPanel>
        </Grid>

任何帮助将不胜感激..

1 个答案:

答案 0 :(得分:0)

确保在Visual Studio中的图像文件属性上将“构建”操作设置为“内容”。通常建议这样做。