我正在使用几个小时前在一个问题上找到的以下代码来使按钮具有图像:
<Button Name="bPlay" Height="70" Width="70" Margin="359,480,349,11">
<Button.Template>
<ControlTemplate>
<Border HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Source="pack://siteoforigin:,,,/Resources/play.bmp" Width="70" Height="70" />
</Border>
</ControlTemplate>
</Button.Template>
</Button>
问题是由于某种原因它在 Visual Studio 上看起来不错,但是当我运行程序时,这些按钮不会出现。我找不到问题,我有点卡住了。图片play.bmp
显然添加到资源中,但我仍然不知道问题是什么,谢谢!