首页 新闻 会员 周边

wpf的按钮如何加载背景图片。

0
悬赏园豆:5 [已解决问题] 解决于 2012-11-20 14:17

<Window x:Class="WpfCoupon.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="573" Width="612">
    <Grid Height="507" Width="552">
        <Button HorizontalAlignment="Left" Margin="20,22,0,0" Name="button1" Width="128" Height="134" VerticalAlignment="Top">Button</Button>
    </Grid>
</Window>

未页的主页 未页 | 菜鸟二级 | 园豆:226
提问于:2012-11-19 14:08
< >
分享
最佳答案
0

button.Background=new Imagebrush{ ImageSource=rui}

收获园豆:3
中文代码 | 小虾三级 |园豆:951 | 2012-11-19 16:40
其他回答(1)
0

同上

收获园豆:2
jerry-Tom | 园豆:4077 (老鸟四级) | 2012-11-20 10:24
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册