【发布时间】:2012-06-10 01:52:48
【问题描述】:
我正在使用几个小时前在一个问题上找到的以下代码来使按钮具有图像:
<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 明明添加到资源中了,还是不知道是什么问题,谢谢!
【问题讨论】: