【发布时间】:2017-02-03 13:14:35
【问题描述】:
我想从 xaml 代码隐藏中获取按钮的背景颜色,请帮助我
【问题讨论】:
-
你的代码在哪里?见How to Ask。
-
(yourButton.Background as SolidColordBrush).Color 为您提供颜色。然后,您可以根据需要(Color.R、Color.B、Color.G、Color.A)将其转换为六进制或其他任何形式。
-
@Kilazu 对不起,我是新手,我认为问题本身解释清楚,下次我会添加更多信息:)
-
@Kilazur 非常感谢你:)
标签: wpf xaml silverlight