首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

在wpf中,怎么在代码中修改Button的背景色为指定颜色

2012-09-04 
在wpf中,如何在代码中修改Button的背景色为指定颜色?可以用这种方式:Button.Background System.Windows.

在wpf中,如何在代码中修改Button的背景色为指定颜色?
可以用这种方式:
Button.Background = System.Windows.Media.Brushes.ForestGreen;
我希望是通过“#FF255687”这样的字符串为button定义背景色。哪位大虾帮忙解决一下?

[解决办法]
System.Drawing.Color.FromArgb(0xFF,0x25,0x56,0x87);

热点排行