开发者论坛

 找回密码
 注册 (请使用非IE浏览器)
查看: 3436|回复: 0

WPF Button无法添加图片,更换背景颜色

[复制链接]

0

精华

0

贡献

0

赞扬

帖子
5
软币
87
在线时间
1 小时
注册时间
2016-8-2
发表于 2016-10-14 15:01:22 | 显示全部楼层 |阅读模式
我引用 DevExpress.Xpf.Core.v16.1 ,然后新建立一个window,在window上添加一个button,添加如下代码想改变button的背景色,
但是没有成功,另外,添加一个背景图片,显示上没有全部填充Button,具体见截图的附件;求大神。

        <Button  ToolTip="文字标注"  Background="White" Height="40" Width="40">
            <Button.Content>
                <Image Source="D:\projects\Martes_10\Martes\CommonLib\Images\Icon\save_16x16.png" Stretch="Fill" />
            </Button.Content>
        </Button>
        <Button Click="Button_Click" Background="Red" Content="Button 1" Margin="120,232,0,172" Width="97" Height="30" HorizontalAlignment="Left"/>

not OK.PNG
OK.PNG
回复

使用道具 举报

Archiver|手机版|小黑屋|开发者网 ( 苏ICP备08004430号-2 )
版权所有:南京韵文教育信息咨询有限公司

GMT+8, 2024-5-7 12:17

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表