I generated a Button dynamically, now I need to change the foreground color and set a BorderBrush. But I can't use code like btn.Foreground = Brushes.Yellow;
VS2013 is warning that 'Brushes does not exist.'
试试这个:包括这个程序集'System.Windows.Media'
btn.Foreground=new SolidColorBrush(Colors.Yellow);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.