C# 图像在编辑模式下可见,但在运行模式下图像不可见
简单的例子。需要添加图像到我的按钮。编码时在屏幕上可见,但在本地机器模式下运行时不可见。我试过png和jpg照片。即使按钮外有图像,也会出现此问题C# 图像在编辑模式下可见,但在运行模式下图像不可见,c#,image,uwp,C#,Image,Uwp,简单的例子。需要添加图像到我的按钮。编码时在屏幕上可见,但在本地机器模式下运行时不可见。我试过png和jpg照片。即使按钮外有图像,也会出现此问题 <RelativePanel Grid.Column="2"> <Button Grid.Column="2" x:Name="vkIcon" RelativePanel.AlignRightWithPanel="True"
<RelativePanel Grid.Column="2">
<Button Grid.Column="2" x:Name="vkIcon"
RelativePanel.AlignRightWithPanel="True"
Background="White"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" BorderThickness="0" >
<StackPanel>
<Image Source="\Assets\Icons\ME.jpg" Height="48"
Width="48"/>
</StackPanel>
</Button>
<Image Source="\Assets\Icons\ME.jpg" Visibility="Visible"/>
</RelativePanel>
编码
RunningApp
不要使用
\Assets\Icons\ME.jpg
试试ms-appx:///Assets/Icons/ME.jpg
@AVKNaidu非常感谢。这真的很有帮助!