📜  wpf 在代码中设置颜色 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:07.250000             🧑  作者: Mango

代码示例1
using System.Windows.Media;

textBox1.Background = Brushes.White;
textBox1.Background = new SolidColorBrush(Colors.White);
textBox1.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0, 0));
textBox1.Background = System.Windows.SystemColors.MenuHighlightBrush;