wpf 后台修改控件颜色(颜色Brush类型新建)
16进制、rgb格式、提供的颜色示例:
xxx.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF")); xxx.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); xxx.Background = Brushes.White;
16进制、rgb格式、提供的颜色示例:
xxx.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF")); xxx.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); xxx.Background = Brushes.White;