0
我試圖插入一個圖像到我的Windows應用商店應用程序,它出現在XAML編輯器的設計時,但在運行時圖像不出現。<Image />在設計時顯示圖像,但不是在運行時;爲什麼?
我很確定我在這裏使用了正確的代碼,並且我已經將該徽標添加到了資產文件夾,但它仍然不會在運行時出現。如果我在代碼或資產文件夾中遇到錯誤,那麼它甚至不會出現在編輯器的設計階段,我認爲是什麼給了它?
XAML:
<Page
x:Class="AppName.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:AppName"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Image Source="Assets\Logos\16380.png"
Stretch="None"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="120, 0, 0, 0"
/>
</Grid>
</Page>