<Button Canvas.Left="159" Canvas.Top="87" Height="35" Name="button2" Width="36" IsCancel="False" Click="button2_Click">
<Image Source="/WpfApplication1;component/bin/Debug/结束.png"></Image>
</Button>
//停止服务
private void button2_Click(object sender, RoutedEventArgs e)
{
Uri uri = new Uri("结束-灰色.png", UriKind.Relative);
BitmapImage bimg = new BitmapImage(uri);
button2.Background = new ImageBrush(bimg);
}
现在我在Click事件里面写没效果?
撒科打诨