簡體   English   中英

設置按鈕的前景色

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM