[英]Set foreground color of button
我動態生成了一個Button,現在需要更改前景色並設置BorderBrush。 但是我不能使用btn.Foreground = Brushes.Yellow;
類的代碼btn.Foreground = Brushes.Yellow;
VS2013警告“畫筆不存在”。
試試這個:包括這個程序集'System.Windows.Media'
btn.Foreground=new SolidColorBrush(Colors.Yellow);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.