我的资源中有一个图像,我想在
Windows手机中将其作为按钮的背景提供.
怎么做?
我试过这个,但是给出了一个错误
怎么做?
我试过这个,但是给出了一个错误
<Button Content="" HorizontalAlignment="Left" BorderBrush="Transparent" Margin="131,681,0" Name="button2" Width="81" Grid.Row="1" Click="button2_Click" Height="64" VerticalAlignment="Top" Background="Images/pause.png"/>
解决方法
试试这个,
<Button Content="" HorizontalAlignment="Left" Margin="114,36,0" Grid.Row="1" VerticalAlignment="Top"> <Button.Background> <ImageBrush Stretch="Fill" ImageSource="/Images/pause.png"/> </Button.Background> </Button>